[ttx] cmap format 13 not merged correctly
See original GitHub issueCf. https://twitter.com/fr_brennan/status/1560057391684763649 Related commit https://github.com/MFEK/Mienai.ttf/commit/e1d99216b75274deaa58cea0ae610d07446c4f39
I fixed it by temporarily overwriting the _IsInSameRun
function:
class cmap_format_13(cmap_format_12_or_13):
_format_step = 0
def __init__(self, format=13):
cmap_format_12_or_13.__init__(self, format)
def _computeGIDs(self, startingGlyph, numberOfGlyphs):
return [startingGlyph] * numberOfGlyphs
def _IsInSameRun(self, glyphID, lastGlyphID, charCode, lastCharCode):
return (glyphID == lastGlyphID)
I don’t know if this is the right fix in general, or just for Mienai. Please advise.
Thanks @kenlunde for his help.
Issue Analytics
- State:
- Created a year ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
cmap table that maps a code point to GID 0 #2031 - GitHub
The font cmunrm.otf has a format 4 cmap subtable that map U+0000 to GID 0, and this seems to cause hb_face_collect_unicodes() to include...
Read more >OpenType Specification Change Log - Microsoft Learn
Changed spellings of field names of ConditionFormat1 table. cmap. For platform ID 0, encoding ID 3, removed suggestion of using format 0 ...
Read more >fonttools · PyPI
fontTools is a library for manipulating fonts, written in Python. The project includes the TTX tool, that can convert TrueType and OpenType fonts...
Read more >Diff - platform/external/fonttools - Google Git
+- TTX is now the name of the XML-based *format* for TT fonts, and not just ... +- added cmap format 6 support...
Read more >ttx — fontTools Documentation - Read the Docs
Once installed you can use the ttx command to convert binary font files (.otf, .ttf, etc) to the TTX XML format, edit them,...
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
feel free to propose a PR to support that – but which doesn’t break backward compat
That is, you need to have all one million different entries in your ttx file.