From 8f7caa4ca489caca851ec0d8426d7857b6d7a051 Mon Sep 17 00:00:00 2001 From: Roozbeh Pournader Date: Thu, 31 Jul 2014 18:04:58 -0700 Subject: Updated build scripts based on July 28 deliveries from ParaType. --- scripts/lib/fontbuild/features.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 scripts/lib/fontbuild/features.py (limited to 'scripts/lib/fontbuild/features.py') 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 -- cgit v1.2.3