1
1
mirror of https://github.com/rsms/inter.git synced 2024-11-23 11:43:47 +03:00

adds "decompose" directive to fontbuild

This commit is contained in:
Rasmus Andersson 2020-08-17 17:12:31 -07:00
parent 87c4a09ce3
commit ded07d03b6
2 changed files with 4 additions and 2 deletions

View File

@ -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)

View File

@ -16,6 +16,7 @@ from fontTools.pens.reverseContourPen import ReverseContourPen
#
knownDirectives = set([
'removeoverlap', # applies overlap removal (boolean union)
'decompose', # decomposes components
])