diff options
author | Rasmus Andersson <rasmus@notion.se> | 2020-08-18 03:12:31 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@notion.se> | 2020-08-18 03:12:31 +0300 |
commit | ded07d03b692475c2bfff1a652c106b4fb18cbda (patch) | |
tree | 98e64df86d191d84be9e682a6a293d572d16b706 | |
parent | 87c4a09ce3c1d05a134e34f9545f6fec9a71f4f6 (diff) | |
download | inter-ded07d03b692475c2bfff1a652c106b4fb18cbda.tar.xz |
adds "decompose" directive to fontbuild
-rw-r--r-- | misc/fontbuildlib/builder.py | 5 | ||||
-rw-r--r-- | misc/fontbuildlib/glyph.py | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/misc/fontbuildlib/builder.py b/misc/fontbuildlib/builder.py index 98166d5ac..b4a53df1b 100644 --- a/misc/fontbuildlib/builder.py +++ b/misc/fontbuildlib/builder.py @@ -115,9 +115,10 @@ class FontBuilder: glyphsToRemoveOverlaps = set() # glyph objects for ufo in masters: for g in ufo: - if g.components and not composedGlyphIsTrivial(g): + directives = findGlyphDirectives(g.note) + if 'decompose' in directives or (g.components and not composedGlyphIsTrivial(g)): glyphNamesToDecompose.add(g.name) - if 'removeoverlap' in findGlyphDirectives(g.note): + if 'removeoverlap' in directives: if g.components and len(g.components) > 0: glyphNamesToDecompose.add(g.name) glyphsToRemoveOverlaps.add(g) diff --git a/misc/fontbuildlib/glyph.py b/misc/fontbuildlib/glyph.py index 734b881e0..8511aa190 100644 --- a/misc/fontbuildlib/glyph.py +++ b/misc/fontbuildlib/glyph.py @@ -16,6 +16,7 @@ from fontTools.pens.reverseContourPen import ReverseContourPen # knownDirectives = set([ 'removeoverlap', # applies overlap removal (boolean union) + 'decompose', # decomposes components ]) |