diff options
author | James Godfrey-Kittle <jamesgk@google.com> | 2015-05-01 10:36:55 -0700 |
---|---|---|
committer | jamesgk <jamesgk19@gmail.com> | 2015-05-01 10:36:55 -0700 |
commit | 0ffd3c7a0d399fdc7fd5a1b89aff75b5438043e7 (patch) | |
tree | 6837565bc2867e18c5acca1d06ebb85fb2e3ad4b /scripts/lib | |
parent | 41516707549dc5ccc029bcb250149f8433669cb0 (diff) |
Infer composite glyphs' unicode values from names.
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/fontbuild/generateGlyph.py | 5 |
1 files changed, 5 insertions, 0 deletions
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) |