Skip to content

Commit

Permalink
adds "decompose" directive to fontbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
rsms committed Aug 18, 2020
1 parent 87c4a09 commit ded07d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions misc/fontbuildlib/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ def _loadDesignspace(designspace):
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)
Expand Down
1 change: 1 addition & 0 deletions misc/fontbuildlib/glyph.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#
knownDirectives = set([
'removeoverlap', # applies overlap removal (boolean union)
'decompose', # decomposes components
])


Expand Down

0 comments on commit ded07d0

Please sign in to comment.