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:
parent
87c4a09ce3
commit
ded07d03b6
@ -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)
|
||||
|
@ -16,6 +16,7 @@ from fontTools.pens.reverseContourPen import ReverseContourPen
|
||||
#
|
||||
knownDirectives = set([
|
||||
'removeoverlap', # applies overlap removal (boolean union)
|
||||
'decompose', # decomposes components
|
||||
])
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user