summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Godfrey-Kittle <jamesgk@google.com>2015-02-04 15:17:13 -0800
committerJames Godfrey-Kittle <jamesgk@google.com>2015-04-16 12:16:28 -0700
commit010849111210df6b5fc7b02c76dd5cf46022e72c (patch)
tree6f403182dde0fc718e866d72be4c6e66e675d6aa
parentecbda8dcfab710d96a16f1b0d7aac1ecfd6d6267 (diff)
Simplify usage of numpy in italics code
-rw-r--r--scripts/lib/fontbuild/italics.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/lib/fontbuild/italics.py b/scripts/lib/fontbuild/italics.py
index d32630a..86bdc53 100644
--- a/scripts/lib/fontbuild/italics.py
+++ b/scripts/lib/fontbuild/italics.py
@@ -7,7 +7,7 @@ from alignpoints import alignCorners
def italicizeGlyph(f, g, angle=10, stemWidth=185):
glyph = f[g.name]
- slope = np.tanh([math.pi * angle / 180])[0]
+ slope = np.tanh(math.pi * angle / 180)
# determine how far on the x axis the glyph should slide
# to compensate for the slant. -600 is a magic number
@@ -265,4 +265,4 @@ def condenseGlyph(glyph, scale=.8, stemWidth=185):
gOut = fitGlyph(glyph, gOut, subsegments)
for i,seg in enumerate(gOut):
gOut[i].points[0].y = glyph[i].points[0].y
- return gOut \ No newline at end of file
+ return gOut