mirror of
https://github.com/rsms/inter.git
synced 2024-11-17 07:47:33 +01:00
adds "decompose" directive to fontbuild
This commit is contained in:
parent
87c4a09ce3
commit
ded07d03b6
2 changed files with 4 additions and 2 deletions
|
@ -115,9 +115,10 @@ class FontBuilder:
|
||||||
glyphsToRemoveOverlaps = set() # glyph objects
|
glyphsToRemoveOverlaps = set() # glyph objects
|
||||||
for ufo in masters:
|
for ufo in masters:
|
||||||
for g in ufo:
|
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)
|
glyphNamesToDecompose.add(g.name)
|
||||||
if 'removeoverlap' in findGlyphDirectives(g.note):
|
if 'removeoverlap' in directives:
|
||||||
if g.components and len(g.components) > 0:
|
if g.components and len(g.components) > 0:
|
||||||
glyphNamesToDecompose.add(g.name)
|
glyphNamesToDecompose.add(g.name)
|
||||||
glyphsToRemoveOverlaps.add(g)
|
glyphsToRemoveOverlaps.add(g)
|
||||||
|
|
|
@ -16,6 +16,7 @@ from fontTools.pens.reverseContourPen import ReverseContourPen
|
||||||
#
|
#
|
||||||
knownDirectives = set([
|
knownDirectives = set([
|
||||||
'removeoverlap', # applies overlap removal (boolean union)
|
'removeoverlap', # applies overlap removal (boolean union)
|
||||||
|
'decompose', # decomposes components
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue