possible solution for problem in ttfonts.py
asl5757 opened this issue · 0 comments
It seems that the length of a range was computed as a negative value in ttfonts.py causing a warning with out of range numbers (and the misguided attempt to change the byte order).
Here is a patch. Apply with: >patch -i [name] ttfonts.py
----snip----
649c649
< idDelta = -(start-subrange[0])
---
> idDelta = start-subrange[0]
668,672c668
< try:
< cmapstr += pack(">h", cm)
< except:
< warnings.warn("cmap value too big/small: %s" % cm)
< cmapstr += pack(">H", -cm)
---
> warnings.warn("negative cmap value ignored: %s" % cm)``
----snap----
Originally posted by @asl5757 in #36 (comment)