From 0ffd3c7a0d399fdc7fd5a1b89aff75b5438043e7 Mon Sep 17 00:00:00 2001 From: James Godfrey-Kittle Date: Fri, 1 May 2015 10:36:55 -0700 Subject: Infer composite glyphs' unicode values from names. --- scripts/lib/fontbuild/generateGlyph.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/lib') diff --git a/scripts/lib/fontbuild/generateGlyph.py b/scripts/lib/fontbuild/generateGlyph.py index 7de9c13..ce381ec 100644 --- a/scripts/lib/fontbuild/generateGlyph.py +++ b/scripts/lib/fontbuild/generateGlyph.py @@ -13,6 +13,7 @@ # limitations under the License. +import re from anchors import alignComponentsToAnchors @@ -93,3 +94,7 @@ def setUnicodeValue(glyph, glyphList): if glyph.name in glyphList: glyph.unicode = int(glyphList[glyph.name], 16) + else: + uvNameMatch = re.match("uni([\dA-F]{4})$", glyph.name) + if uvNameMatch: + glyph.unicode = int(uvNameMatch.group(1), 16) -- cgit v1.2.3