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 8000
Subsetting CFFs without subroutines #1
Closed
@jenskutilek

Description

@jenskutilek

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0