question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Double-byte Unicodes?

See original GitHub issue

Hi –

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:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
anthrotypecommented, Jul 17, 2018

No problem!

1reaction
laerm0commented, Jul 17, 2018

Oh, duh. Sorry! Thanks.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found