diff options
author | James Godfrey-Kittle <jamesgk@google.com> | 2015-04-09 10:27:44 -0700 |
---|---|---|
committer | James Godfrey-Kittle <jamesgk@google.com> | 2015-04-16 12:16:34 -0700 |
commit | 4c2e21af55b6081a879cfe6fa3a12799daf2d993 (patch) | |
tree | 3e6827b4bbb6b6171ca5d52642fa513ca18a78fb /scripts/lib/fontbuild | |
parent | 63c97fc065960d79b544b13ed3801a008cc7c50c (diff) |
Handle missing anchors when building mark feature.
Diffstat (limited to 'scripts/lib/fontbuild')
-rwxr-xr-x | scripts/lib/fontbuild/markFeature.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/lib/fontbuild/markFeature.py b/scripts/lib/fontbuild/markFeature.py index f3ba7c4..e2c4a38 100755 --- a/scripts/lib/fontbuild/markFeature.py +++ b/scripts/lib/fontbuild/markFeature.py @@ -93,6 +93,12 @@ def GenerateFeature_mark(font): classname = "@MC_" + anchor_name
accent_name_list = CreateAccNameList(font, acc_anchor_name, comb_accent_only)
+ if not accent_name_list:
+ print (
+ 'No glyph found with anchor "%s", skipping mark lookup for %s.' %
+ (acc_anchor_name, classname))
+ continue
+
accent_mark_list = CreateAccGlyphList(font, accent_name_list, acc_anchor_name)
base_mark_list = CreateGlyphList(font, accent_name_list, anchor_name)
text += Create_mark_lookup(accent_mark_list, base_mark_list, lookupname, classname, expand_to_composits)
|