diff options
author | Roozbeh Pournader <roozbeh@google.com> | 2014-07-31 18:04:58 -0700 |
---|---|---|
committer | Roozbeh Pournader <roozbeh@google.com> | 2014-07-31 18:04:58 -0700 |
commit | 8f7caa4ca489caca851ec0d8426d7857b6d7a051 (patch) | |
tree | cfd797651152bf7c8d75f0e8e02abd665266dcce /scripts/lib/fontbuild/features.py | |
parent | eea9030fef36f1ff05e0d7dc7b28c9cc26dcd53f (diff) |
Updated build scripts based on July 28 deliveries from ParaType.
Diffstat (limited to 'scripts/lib/fontbuild/features.py')
-rwxr-xr-x | scripts/lib/fontbuild/features.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/lib/fontbuild/features.py b/scripts/lib/fontbuild/features.py new file mode 100755 index 0000000..0e89a57 --- /dev/null +++ b/scripts/lib/fontbuild/features.py @@ -0,0 +1,16 @@ +import string
+from FL import *
+
+def CreateFeaFile(font, path):
+ fea_text = font.ot_classes
+ for cls in font.classes:
+ text = "@" + cls + "];\n"
+ text = string.replace(text, ":", "= [")
+ text = string.replace(text, "\'", "")
+ fea_text += text
+ for fea in font.features:
+ fea_text += fea.value
+ fea_text = string.replace(fea_text, "\r\n", "\n")
+ fout = open(path, "w")
+ fout.write(fea_text)
+ fout.close()
\ No newline at end of file |