Commit aa65d66b authored by Gustavo Ferreira's avatar Gustavo Ferreira
Browse files

small edits to glyph construction example script

parent dde76314
Pipeline #61098147 passed with stage
in 2 minutes and 2 seconds
......@@ -7,10 +7,13 @@ from glyphConstruction import ParseGlyphConstructionListFromString, GlyphConstru
# define glyph constructions
txt = '''\
agrave = a + grave@center,top
?agrave = a + grave@center,top
aacute = a + acute@center,top
'''
# filter out lines starting with '?'
txt = '\n'.join([L for L in txt.split('\n') if not L.startswith('?')])
# get the actual glyph constructions from text
constructions = ParseGlyphConstructionListFromString(txt)
......@@ -24,7 +27,7 @@ for construction in constructions:
constructionGlyph = GlyphConstructionBuilder(construction, font)
# get the destination glyph in the font
glyph = font.newGlyph(constructionGlyph.name)
glyph = font.newGlyph(constructionGlyph.name, clear=True)
# draw the construction glyph into the destination glyph
constructionGlyph.draw(glyph.getPen())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment