8000 Subsetting CFFs without subroutines · Issue #1 · fonttools/fonttools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Subsetting CFFs without subroutines #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jenskutilek opened this issue Sep 3, 2013 · 2 comments
Closed

Subsetting CFFs without subroutines #1

jenskutilek opened this issue Sep 3, 2013 · 2 comments

Comments

@jenskutilek
Copy link
Collaborator

When testing the subsetter script, I came across a very complex font that apparently doesn’t use subroutines. The subsetter chokes on that ... I think the script has to check if there are any subroutines:

--- subset.py   2013-09-03 12:08:32.000000000 +0200
+++ subset.py   2013-09-03 12:47:09.000000000 +0200
@@ -1404,7 +1404,8 @@
     if hasattr(font, 'FDSelect'):
       all_subrs.extend(fd.Private.Subrs for fd in font.FDArray if hasattr(fd.Private, 'Subrs'))
     else:
-      all_subrs.append(font.Private.Subrs)
+      if hasattr(font.Private, 'Subrs'):
+        all_subrs.append(font.Private.Subrs)
     # Prepare
     for subrs in all_subrs:
       if not subrs: continue
@behdad
Copy link
Member
behdad commented Sep 3, 2013

Fixed a bit differently. Please test. Thanks.

@jenskutilek
Copy link
Collaborator Author

Works! Thanks.

xin3liang pushed a commit to xin3liang/platform_external_fonttools that referenced this issue Jul 26, 2014
brawer added a commit that referenced this issue Sep 9, 2015
brawer pushed a commit that referenced this issue Aug 29, 2016
Fixed encoding error in subset tool in Windows
anthrotype pushed a commit to anthrotype/fonttools that referenced this issue Jan 24, 2017
PR819 fixes: don't write empty <assembly> elements
belluzj pushed a commit to belluzj/fonttools that referenced this issue Nov 22, 2017
Minor: whitespace, gitignore and py23 (print function and unicode_literals)
anthrotype pushed a commit that referenced this issue Jun 7, 2018
make it work on both python 2 and 3
anthrotype pushed a commit to anthrotype/fonttools that referenced this issue Oct 18, 2018
glifLib: open files as binary to avoid line-endings normalization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0