Calling instantiateVariableFont can lead to negative advance widths in hmtx
See original GitHub issueHi!
Calling instantiateVariableFont
can introduce negative advance widths in the hmtx
table:
We could probably replace line 146 by entry[0] = max(0, entry[0] + width_delta)
. I can open a PR if you want.
(Carefully crafted fonts shouldn’t trigger this problem, but I’ve got it using a subset font where advance of unused glyphes has been set to 0.)
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
"'hmtx' table can't contain negative advance widths": I' ...
'hmtx' table can't contain negative advance widths @nyshadhr9 got this error when trying to subset a VF font supplied offline by @m4rc1e We ......
Read more >fonttools [python-library]
| fontTools is a library for manipulating fonts, written in Python. The project includes the TTX tool, that can convert TrueType and OpenType...
Read more >hmtx - Horizontal metrix table (OpenType 1.9) - Typography
The table uses a longHorMetric record to give the advance width and left side bearing of a glyph. Records are indexed by glyph...
Read more >PKG-INFO - platform/external/fonttools
project includes the TTX tool, that can convert TrueType and OpenType. fonts to and from an XML text format, which is also called...
Read more >RF 1.8 Test Install hmtx error
Looking at the output window, the bottom line says: TTLibError: 'hmtx' table can't contain negative advance widths.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
you’re right
yes please, thank you
We can backport the fix to mutator as well, I can take a look tomorrow