otRebuilder icon indicating copy to clipboard operation
otRebuilder copied to clipboard

Software failed when dealing with 'space' glyph in Hack

Open NightFurySL2001 opened this issue 3 years ago • 0 comments

I am converting Hack font from 2048 UPM to 1000 UPM. The following error is given when parsing otrebuild.exe --UPM 1000 --O3 -o Hack1000-Regular.ttf .\Hack-Regular.ttf:

Input Font: .\Hack-Regular.ttf
Processing...
Traceback (most recent call last):
  File "otRebuilder\otrebuild.py", line 395, in <module>
  File "otRebuilder\otrebuild.py", line 102, in main
  File "otRebuilder\otrebuild.py", line 276, in processFont
  File "otRebuilder\otrebuild.py", line 310, in doJobs
  File "otRebuilder\otrebuild.py", line 346, in doFixes
  File "otRebuilder\Lib\Fixer.py", line 87, in fixOS2f2
  File "otRebuilder\Lib\Workers.py", line 50, in recalcXAvgCharWidth
KeyError: 'space'
Failed to execute script otrebuild

I determined the problem to stem from --recalculate, which when disabled will parse the font flawlessly.

NightFurySL2001 avatar Nov 13 '20 12:11 NightFurySL2001