diff options
author | James Godfrey-Kittle <jamesgk@google.com> | 2015-04-08 16:14:56 -0700 |
---|---|---|
committer | James Godfrey-Kittle <jamesgk@google.com> | 2015-04-16 12:16:33 -0700 |
commit | 56ad4064e8eeff6c320952daef8767188ae7fa63 (patch) | |
tree | 5907c6682cb65a0c2ad778605376e95ba8dc436b /scripts/lib/fontbuild/italics.py | |
parent | 40f2f9fdaa46d1773ebc805150da70c9acfeac3e (diff) |
Update scripts based on 03/31 delivery.
Diffstat (limited to 'scripts/lib/fontbuild/italics.py')
-rw-r--r-- | scripts/lib/fontbuild/italics.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/lib/fontbuild/italics.py b/scripts/lib/fontbuild/italics.py index 86bdc53..77e205a 100644 --- a/scripts/lib/fontbuild/italics.py +++ b/scripts/lib/fontbuild/italics.py @@ -6,6 +6,8 @@ import math from alignpoints import alignCorners def italicizeGlyph(f, g, angle=10, stemWidth=185): + unic = g.unicode #save unicode + glyph = f[g.name] slope = np.tanh(math.pi * angle / 180) @@ -23,6 +25,9 @@ def italicizeGlyph(f, g, angle=10, stemWidth=185): transformFLGlyphMembers(f[g.name], m) + if unic > 0xFFFF: #restore unicode + g.unicode = unic + def italicize(glyph, angle=12, stemWidth=180, xoffset=-50): CURVE_CORRECTION_WEIGHT = .03 |