Skip to content

Commit 2c652cf

Browse files
committed
fixes OS/2 table usWeightClass entry in static fonts by rounding to nearest 100th. Closes #583
1 parent b7ed03d commit 2c652cf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

misc/tools/postprocess_instance_ufo.py

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ def main(argv):
4040
# "postscriptFontName" maps to name ID 6 "postscriptName"
4141
ufo.info.postscriptFontName = rmspace(familyName) + '-' + rmspace(styleName)
4242

43+
# round OS/2 weight class values to even 100ths
44+
ufo.info.openTypeOS2WeightClass = round(ufo.info.openTypeOS2WeightClass / 100) * 100
45+
4346
ufo.save(ufo_file)
4447

4548

0 commit comments

Comments
 (0)