summaryrefslogtreecommitdiff
path: root/scripts/lib/fontbuild/generateGlyph.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/fontbuild/generateGlyph.py')
-rw-r--r--scripts/lib/fontbuild/generateGlyph.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/lib/fontbuild/generateGlyph.py b/scripts/lib/fontbuild/generateGlyph.py
index ce381ec..4d1323f 100644
--- a/scripts/lib/fontbuild/generateGlyph.py
+++ b/scripts/lib/fontbuild/generateGlyph.py
@@ -58,6 +58,13 @@ def copyMarkAnchors(f, g, srcname, width):
# g.appendAnchor(anchor.name, (anchor.x + width, anchor.y))
+def shiftGlyphMembers(g, x):
+ for contour in g.contours:
+ contour.move((x, 0))
+ for component in g.components:
+ component.move((x, 0))
+
+
def generateGlyph(f,gname,glyphList={}):
glyphName, baseName, accentNames, offset = parseComposite(gname)
@@ -81,7 +88,7 @@ def generateGlyph(f,gname,glyphList={}):
copyMarkAnchors(f, g, baseName, offset[1] + offset[0])
if offset[0] != 0 or offset[1] != 0:
g.width += offset[1] + offset[0]
- g.move((offset[0], 0))
+ shiftGlyphMembers(g, offset[0])
if len(accentNames) > 0:
alignComponentsToAnchors(f, glyphName, baseName, accentNames)
else: