Cross platform TTF font render from Python [was: Load TTF from pycairo under Windows]
gandalf at shopzeus.com
Fri Sep 18 08:54:13 CEST 2009
I need to render antialiased PNG images using TTF font files and UTF-8
text. It needs to be available at least on Linux and Windows. This is
what I have tried:
#1. PIL - it has some problems and I cannot use it. Specifically, the
ImageFont.getsize() returns bad value for some fonts, and there are some
TTF fonts that are rendered incorrectly (UTF-8)
#2. pycairo - very sophisticated, nice features, knows and does
everything correctly. However, has no native support for libfreetype. I
could write an extension in C and use it from Linux. Not available on
#3. gdmodule - I tried to install in under windows without success. No
binary installer available.
#4. pygame - documentation looks great, it is cross platform. But the
first example program I had tried has been terminated, printing out
memory dump and complaining about double freeing some memory location.
What other options do we have?
More information about the Python-list