[Image-SIG] TrueType font encoding (re-post)
Laszlo Nagy
gandalf at shopzeus.com
Fri Jun 13 13:29:56 CEST 2008
This is a re-post. I did this re-post because nobody knew the answer to
my original one, which was about a month ago. In the worst case I'm
going to give up working with PIL and migrate to something that does not
have this bug and will not post again. I hope you forgive me.
Example program "test.py" is attached .
The font (cartoon.ttf) and output of the program (test.png) is attached.
Also "with_gimp.png" is attached that shows the same thing created in
Gimp with the same ttf file. The obvious problem is that PIL puts "u"
instead of "ü".
Fredrik Lundh told me that PIL and Gimp are using the same engine for
rendering fonts, so probably the problem is not with font rendering, and
of course not with the ttf file. He also told me that the encoding
parameter of ImageFont.truetype is ignored unless it is exactly four
characters.
Does anybody know how to solve the problem?
Thanks,
Laszlo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cartoon.ttf
Type: application/x-font-ttf
Size: 95588 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/image-sig/attachments/20080613/b5c88949/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.png
Type: image/png
Size: 9118 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/image-sig/attachments/20080613/b5c88949/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py
Type: text/x-python
Size: 412 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/image-sig/attachments/20080613/b5c88949/attachment-0001.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: with_gimp.png
Type: image/png
Size: 6270 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/image-sig/attachments/20080613/b5c88949/attachment-0003.png>
More information about the Image-SIG
mailing list