diff options
author | James Godfrey-Kittle <jamesgk@google.com> | 2015-02-10 16:15:36 -0800 |
---|---|---|
committer | James Godfrey-Kittle <jamesgk@google.com> | 2015-04-16 12:16:29 -0700 |
commit | 60d5644c64b0be1af7ecefcf0e644d4e5691a694 (patch) | |
tree | a5d3b5baab11f07a1287ab95d9cbd1685508bba3 /scripts/lib/fontbuild/kerning.py | |
parent | 44f5079ba84bf30aa4072f877687b188e06ee8ce (diff) |
More robust feature support.
Diffstat (limited to 'scripts/lib/fontbuild/kerning.py')
-rw-r--r-- | scripts/lib/fontbuild/kerning.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/scripts/lib/fontbuild/kerning.py b/scripts/lib/fontbuild/kerning.py deleted file mode 100644 index def733b..0000000 --- a/scripts/lib/fontbuild/kerning.py +++ /dev/null @@ -1,25 +0,0 @@ -import re - -def markKernClassesLR(f): - for i in range(len(f.classes)): - classname = f.classes[i].split(':', 1).pop(0).strip() - if classname.startswith('_'): - l = 0 - r = 0 - if classname.endswith('_L'): - l = 1 - elif classname.endswith('_R'): - r = 1 - elif classname.endswith('_LR'): - l = 1 - r = 1 - f.SetClassFlags(i, l, r) - fl.UpdateFont() - -def generateFLKernClassesFromOTString(f,classString): - classString.replace("\r","\n") - rx = re.compile(r"@(_[\w]+)\s*=\s*\[\s*(\w+?)\s+(.*?)\]\s*;") - classes = ["%s : %s' %s" %(m[0],m[1],m[2]) for m in rx.findall(classString)] - f.classes = classes - markKernClassesLR(f) - |