diff options
author | Rasmus Andersson <rasmus@notion.se> | 2019-01-05 22:41:37 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@notion.se> | 2019-01-05 22:41:37 +0300 |
commit | dee86b504c021bd465e124360a035d72e7abaa6d (patch) | |
tree | 87c6bf1b9495a31b8ba1758f840edbdac5e7e493 /misc | |
parent | f15b156c4d2bfe939a070286514ba84d9fea95ea (diff) | |
download | inter-dee86b504c021bd465e124360a035d72e7abaa6d.tar.xz |
patches ufo2ft and drops python 2 env for OTF compilation
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/fontbuild | 11 | ||||
-rwxr-xr-x | misc/fontbuild2 | 6 | ||||
-rw-r--r-- | misc/ufo2ft-2.5.0-outlineCompiler.patch | 18 |
3 files changed, 28 insertions, 7 deletions
diff --git a/misc/fontbuild b/misc/fontbuild index cf5d21f68..8b3e924fd 100755 --- a/misc/fontbuild +++ b/misc/fontbuild @@ -197,7 +197,16 @@ def setFontInfo(font, weight): # family = font.info.familyName # i.e. "Inter UI" style = font.info.styleName # e.g. "Medium Italic" - isitalic = font.info.italicAngle != 0 + + # 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. + isitalic = False + if font.info.italicAngle != 0: + isitalic = True + font.info.italicAngle = round(font.info.italicAngle, 1) + else: + font.info.italicAngle = 0 # weight font.info.openTypeOS2WeightClass = weight diff --git a/misc/fontbuild2 b/misc/fontbuild2 deleted file mode 100755 index bece1063c..000000000 --- a/misc/fontbuild2 +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -pushd "$(dirname "$0")/.." >/dev/null -SRCDIR=$(PWD) -popd >/dev/null - -"$SRCDIR/build/venv2/bin/python" misc/fontbuild "$@" diff --git a/misc/ufo2ft-2.5.0-outlineCompiler.patch b/misc/ufo2ft-2.5.0-outlineCompiler.patch new file mode 100644 index 000000000..dd500992c --- /dev/null +++ b/misc/ufo2ft-2.5.0-outlineCompiler.patch @@ -0,0 +1,18 @@ +--- a/ufo2ft/outlineCompiler.py ++++ b/ufo2ft/outlineCompiler.py +@@ -983,7 +983,14 @@ + topDict.UnderlineThickness = otRound(underlineThickness) + # populate font matrix + unitsPerEm = otRound(getAttrWithFallback(info, "unitsPerEm")) +- topDict.FontMatrix = [1.0 / unitsPerEm, 0, 0, 1.0 / unitsPerEm, 0, 0] ++ topDict.FontMatrix = [ ++ round(1.0 / unitsPerEm, 14), ++ 0, ++ 0, ++ round(1.0 / unitsPerEm, 14), ++ 0, ++ 0 ++ ] + # populate the width values + if not any(hasattr(info, attr) and getattr(info, attr) is not None + for attr in ("postscriptDefaultWidthX", |