summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@notion.se>2023-06-12 02:18:40 +0300
committerRasmus Andersson <rasmus@notion.se>2023-06-12 02:18:40 +0300
commit2c652cfc9a3bfcec99d255ca1a6b860a29487179 (patch)
treeaf78623b5b8bd4480913e41698c04d46ff34663d
parentb7ed03d0e233a950cb06c29a3645c0d1e6cfad60 (diff)
downloadinter-2c652cfc9a3bfcec99d255ca1a6b860a29487179.tar.xz
fixes OS/2 table usWeightClass entry in static fonts by rounding to nearest 100th. Closes #583v4.0-beta9g
-rw-r--r--misc/tools/postprocess_instance_ufo.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/misc/tools/postprocess_instance_ufo.py b/misc/tools/postprocess_instance_ufo.py
index 7540b8d6d..1f54c2c05 100644
--- a/misc/tools/postprocess_instance_ufo.py
+++ b/misc/tools/postprocess_instance_ufo.py
@@ -40,6 +40,9 @@ def main(argv):
# "postscriptFontName" maps to name ID 6 "postscriptName"
ufo.info.postscriptFontName = rmspace(familyName) + '-' + rmspace(styleName)
+ # round OS/2 weight class values to even 100ths
+ ufo.info.openTypeOS2WeightClass = round(ufo.info.openTypeOS2WeightClass / 100) * 100
+
ufo.save(ufo_file)