diff options
author | James Godfrey-Kittle <jamesgk@google.com> | 2015-04-10 12:42:35 -0700 |
---|---|---|
committer | James Godfrey-Kittle <jamesgk@google.com> | 2015-04-16 12:16:34 -0700 |
commit | 931ed8a2df0e790e980785d2e0da9a7de738c8ea (patch) | |
tree | 7c3824b9d78f3369d3bc2bc359fc02aa8f9da166 /scripts/lib/fontbuild/features.py | |
parent | e6d114559a020a29e0f64cfd674de401609d7083 (diff) |
Update scripts to use external kerning rules.
Diffstat (limited to 'scripts/lib/fontbuild/features.py')
-rwxr-xr-x | scripts/lib/fontbuild/features.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/lib/fontbuild/features.py b/scripts/lib/fontbuild/features.py index 4e128a5..e26954b 100755 --- a/scripts/lib/fontbuild/features.py +++ b/scripts/lib/fontbuild/features.py @@ -193,10 +193,14 @@ def updateFeature(font, name, value): font.features.text += "\n" + value
-def readFeatureFile(font, text):
+def readFeatureFile(font, text, prepend=True):
"""Incorporate valid definitions from feature text into font."""
writer = FilterFeatureWriter(set(font.keys()))
- parser.parseFeatures(writer, text + font.features.text)
+ if prepend:
+ text += font.features.text
+ else:
+ text = font.features.text + text
+ parser.parseFeatures(writer, text)
font.features.text = writer.write()
|