summaryrefslogtreecommitdiff
path: root/scripts/lib/fontbuild/italics.py
diff options
context:
space:
mode:
authorJames Godfrey-Kittle <jamesgk@google.com>2015-01-25 16:07:18 -0800
committerJames Godfrey-Kittle <jamesgk@google.com>2015-04-16 12:16:27 -0700
commit4ee04b9735ff0d252124816c3413d37eddf204fe (patch)
tree62e6cb712329ba23a01c00624cd6ce2223a12f5f /scripts/lib/fontbuild/italics.py
parent68a71223632aa384d09b2cb27e61830faeec46e6 (diff)
Remove references to FL (stub out missing methods)
Diffstat (limited to 'scripts/lib/fontbuild/italics.py')
-rw-r--r--scripts/lib/fontbuild/italics.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/lib/fontbuild/italics.py b/scripts/lib/fontbuild/italics.py
index 8e12619..d32630a 100644
--- a/scripts/lib/fontbuild/italics.py
+++ b/scripts/lib/fontbuild/italics.py
@@ -1,16 +1,14 @@
from fontTools.misc.transform import Transform
-from robofab.world import CurrentFont
from robofab.world import RFont
from time import clock
import numpy as np
import math
from alignpoints import alignCorners
-def italicizeGlyph(g, angle=10, stemWidth=185):
- f = CurrentFont()
+def italicizeGlyph(f, g, angle=10, stemWidth=185):
glyph = f[g.name]
- slope = np.tanh([math.pi * angle / 180])
-
+ slope = np.tanh([math.pi * angle / 180])[0]
+
# determine how far on the x axis the glyph should slide
# to compensate for the slant. -600 is a magic number
# that assumes a 2048 unit em square