Double-byte Unicodes?
See original GitHub issueHi –
It looks like TTX can’t handle double-byte Unicodes. I dumped a TTF, edited a few Unicodes, and then when going back to TTF, I won this error:
File "/usr/local/lib/python3.6/site-packages/fontTools/ttx.py", line 398, in main
process(jobs, options)
File "/usr/local/lib/python3.6/site-packages/fontTools/ttx.py", line 372, in process
action(input, output, options)
File "/usr/local/lib/python3.6/site-packages/fontTools/misc/loggingTools.py", line 372, in wrapper
return func(*args, **kwds)
File "/usr/local/lib/python3.6/site-packages/fontTools/ttx.py", line 290, in ttCompile
ttf.save(output)
File "/usr/local/lib/python3.6/site-packages/fontTools/ttLib/ttFont.py", line 172, in save
writer_reordersTables = self._save(tmp)
File "/usr/local/lib/python3.6/site-packages/fontTools/ttLib/ttFont.py", line 211, in _save
self._writeTable(tag, writer, done, tableCache)
File "/usr/local/lib/python3.6/site-packages/fontTools/ttLib/ttFont.py", line 632, in _writeTable
tabledata = self.getTableData(tag)
File "/usr/local/lib/python3.6/site-packages/fontTools/ttLib/ttFont.py", line 650, in getTableData
return self.tables[tag].compile(self)
File "/usr/local/lib/python3.6/site-packages/fontTools/ttLib/tables/_c_m_a_p.py", line 118, in compile
chunk = table.compile(ttFont)
File "/usr/local/lib/python3.6/site-packages/fontTools/ttLib/tables/_c_m_a_p.py", line 829, in compile
charCodeArray = array.array("H", endCode + [0] + startCode)
OverflowError: unsigned short is greater than maximum```
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
DBCS - Wikipedia
A DBCS supports national languages that contain many unique characters or symbols (the maximum number of characters that can be represented with one...
Read more >Double-byte character set - IBM
Each double-byte character contains 2 bytes, each of which must be in the range X'41' to X'FE'. The first byte of a double-byte...
Read more >Double-byte Character Sets - Win32 apps - Microsoft Learn
A double-byte character set (DBCS), also known as an "expanded 8-bit character set", is an extended single-byte character set (SBCS), ...
Read more >What are Double-Byte, Single-Byte, and Multi-Byte Encodings?
Unicode may be the most well-known, but it co-exists with other encodings that originate from various standards organizations like ISO, ANSI, and KSC....
Read more >ASCII and UTF-8 2-byte Characters - Design215
c2 a0 ¡ c2 a1 ¢ c2 a2 £ c2 a3 ¤ c2 a4 ¥ c2 a5 ¦ c2 a6 § c2 a7...
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
No problem!
Oh, duh. Sorry! Thanks.