From 010849111210df6b5fc7b02c76dd5cf46022e72c Mon Sep 17 00:00:00 2001 From: James Godfrey-Kittle Date: Wed, 4 Feb 2015 15:17:13 -0800 Subject: Simplify usage of numpy in italics code --- scripts/lib/fontbuild/italics.py | 4 ++-- 1 file 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 -- cgit v1.2.3