summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/fontbuild/generateGlyph.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/scripts/lib/fontbuild/generateGlyph.py b/scripts/lib/fontbuild/generateGlyph.py
index 2b29ada..4f9f026 100644
--- a/scripts/lib/fontbuild/generateGlyph.py
+++ b/scripts/lib/fontbuild/generateGlyph.py
@@ -17,18 +17,15 @@ def parseComposite(composite):
def generateGlyph(f,gname):
- if gname.find("_") != -1:
-
- #TODO(jamesgk@google.com) handle underscores
- return
-
- generateString = gname
- g = f.generateGlyph(generateString)
- if f.FindGlyph(g.name) == -1:
- f.glyphs.append(g)
- return g
+ glyphName, baseName, accentNames, offset = parseComposite(gname)
+ if baseName.find("_") != -1:
+ g = f.newGlyph(glyphName)
+ lastWidth = 0
+ for componentName in baseName.split("_"):
+ g.appendComponent(componentName, (lastWidth, 0))
+ lastWidth = f[componentName].width
+ g.width += lastWidth
else:
- glyphName, baseName, accentNames, offset = parseComposite(gname)
if not f.has_key(glyphName):
try:
f.compileGlyph(glyphName, baseName, accentNames)