Skip to content

Commit

Permalink
fixes OS/2 table usWeightClass entry in static fonts by rounding to n…
Browse files Browse the repository at this point in the history
…earest 100th. Closes #583
  • Loading branch information
rsms committed Jun 11, 2023
1 parent b7ed03d commit 2c652cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions misc/tools/postprocess_instance_ufo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 2c652cf

Please sign in to comment.