From 0977151206718298a852b97167571114383939cd Mon Sep 17 00:00:00 2001 From: Rasmus Andersson Date: Tue, 6 Aug 2019 19:28:53 -0700 Subject: fontbuild: Fixes a bug that would cause certain instance styles to be incorrectly flagged as "italic". This was an effect from negating the slant angle. --- misc/fontbuild | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'misc') diff --git a/misc/fontbuild b/misc/fontbuild index 075886a7e..58ce34e73 100755 --- a/misc/fontbuild +++ b/misc/fontbuild @@ -259,9 +259,8 @@ def setFontInfo(font, weight): style = font.info.styleName # e.g. "Medium Italic" # Update italicAngle - isitalic = False - if font.info.italicAngle != 0: - isitalic = True + isitalic = style.find("Italic") != -1 + if isitalic: font.info.italicAngle = float('%.8g' % font.info.italicAngle) else: font.info.italicAngle = 0 # avoid "-0.0" value in UFO -- cgit v1.2.3