diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2014-05-09 17:05:32 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2014-05-09 17:05:32 -0400 |
commit | da223b8fa8a1073f96b3d2c8e400f73e51941b71 (patch) | |
tree | 96a02698c3f11e4261b8b3f077617f1017d3eef4 | |
parent | f09164a0de9882c62f783ad608882db25626541a (diff) | |
download | fonttools-da223b8fa8a1073f96b3d2c8e400f73e51941b71.tar.gz |
Minor optimization
-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 a9f388b8..a356c3cf 100644 --- a/Lib/fontTools/ttLib/tables/_c_m_a_p.py +++ b/Lib/fontTools/ttLib/tables/_c_m_a_p.py @@ -673,7 +673,7 @@ class cmap_format_4(CmapSubtable): glyphID = charCode + idDelta[i] else: # *someone* needs to get killed. - index = idRangeOffset[i] // 2 + (charCode - startCode[i]) + i - len(idRangeOffset) + index = rangeOffset // 2 + (charCode - startCode[i]) + i - len(idRangeOffset) assert (index < lenGIArray), "In format 4 cmap, range (%d), the calculated index (%d) into the glyph index array is not less than the length of the array (%d) !" % (i, index, lenGIArray) if glyphIndexArray[index] != 0: # if not missing glyph glyphID = glyphIndexArray[index] + idDelta[i] |