diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2014-05-21 19:08:39 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2014-05-21 19:14:03 -0400 |
commit | e7fb216ad8f65ee4d451a0c3e698dfafd7cf2436 (patch) | |
tree | d843ea78bc3c0b3fae52ae9846fdf9e8ab144ccc | |
parent | 4c777d3465d16db968dc3f58a1f30444eed732a3 (diff) | |
download | fonttools-e7fb216ad8f65ee4d451a0c3e698dfafd7cf2436.tar.gz |
Fix cmap subtable format 4 compiling
Was failing all these years, if a idDelta value happened to be
exactly -0x8000...
Test case: roundtripping MTLmr3m.ttf.
-rw-r--r-- | Lib/fontTools/ttLib/tables/_c_m_a_p.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/fontTools/ttLib/tables/_c_m_a_p.py b/Lib/fontTools/ttLib/tables/_c_m_a_p.py index 3398a889..9dea0108 100644 --- a/Lib/fontTools/ttLib/tables/_c_m_a_p.py +++ b/Lib/fontTools/ttLib/tables/_c_m_a_p.py @@ -712,7 +712,7 @@ class cmap_format_4(CmapSubtable): if idDelta > 0x7FFF: idDelta = idDelta - 0x10000 - elif idDelta < -0x7FFF: + elif idDelta < -0x8000: idDelta = idDelta + 0x10000 return idDelta |