fixes OS/2 table usWeightClass entry in static fonts by rounding to nearest 100th. Closes #583

This commit is contained in:
Rasmus Andersson 2023-06-11 16:18:40 -07:00
parent b7ed03d0e2
commit 2c652cfc9a

View file

@ -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)