robotools / compositor

A basic OpenType GSUB and GPOS layout engine.
MIT License
31 stars 11 forks source link

Make compatible for Python 3 by not converting text to unicode() if the version is 3 or greater #23

Closed andyclymer closed 5 years ago

andyclymer commented 6 years ago

Test code, Python 2:

# coding: utf-8
from compositor import Font
f = Font("/path/to/font.otf")
print(f.stringToGlyphNames(u"üñîçø∂é"))

Test code, Python 3:

from compositor import Font
f = Font("/path/to/font.otf")
print(f.stringToGlyphNames("üñîçø∂é"))
andyclymer commented 6 years ago

Updated with @typemytype 's suggested fix