Skip to content

Commit

Permalink
fontbuild: Fixes a bug that would cause certain instance styles to be…
Browse files Browse the repository at this point in the history
… incorrectly flagged as "italic". This was an effect from negating the slant angle.
  • Loading branch information
rsms committed Aug 7, 2019
1 parent 4f82047 commit 0977151
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions misc/fontbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0977151

Please sign in to comment.