diff options
author | Rasmus Andersson <rasmus@notion.se> | 2019-01-05 23:00:00 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@notion.se> | 2019-01-05 23:00:00 +0300 |
commit | 718930e07f8ee60f54c9a92e6ed86d41a0ddcb2a (patch) | |
tree | 5977f0ab067603d4591cc64f432d19e344acbfd7 /misc/fontbuild | |
parent | dee86b504c021bd465e124360a035d72e7abaa6d (diff) | |
download | inter-718930e07f8ee60f54c9a92e6ed86d41a0ddcb2a.tar.xz |
patch fonttools instead of ufo2ft
Diffstat (limited to 'misc/fontbuild')
-rwxr-xr-x | misc/fontbuild | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/misc/fontbuild b/misc/fontbuild index 8b3e924fd..3d3d70b76 100755 --- a/misc/fontbuild +++ b/misc/fontbuild @@ -198,15 +198,13 @@ def setFontInfo(font, weight): family = font.info.familyName # i.e. "Inter UI" style = font.info.styleName # e.g. "Medium Italic" - # Patch italicAngle to be either positive zero or single-decimal precision - # floating-point number. - # This value can go wrong since we are using floating-point numbers. + # Update italicAngle isitalic = False if font.info.italicAngle != 0: isitalic = True - font.info.italicAngle = round(font.info.italicAngle, 1) + font.info.italicAngle = float('%.8g' % font.info.italicAngle) else: - font.info.italicAngle = 0 + font.info.italicAngle = 0 # avoid "-0.0" value in UFO # weight font.info.openTypeOS2WeightClass = weight |