[Image-SIG] ImageFont family mojibake
donn.ingle at gmail.com
Mon Sep 14 08:29:31 CEST 2009
(Reposted to image-sig: I sent it to python-list by mistake.)
PIL Version: 1.1.6-3ubuntu1
libfreetype6 Version: 2.3.9-4ubuntu0.1
I have a feeling I've asked this in the distant past, but it's recently
emerged as a bug in my app so can anyone point me in the right direction?
In Fonty Python, when I draw the family name of a font some* are mojibake in
the form: ????s??? etc. The string is drawn to a DC with
wxPython, but is fetched from the font via ImageFont, like so:
So, the string is plain (not unicode) and wrong from the get-go.
*"some" being those fonts that contain family names not in western encodings.
The sample font that demonstrates the problem and was sent to me to test is
called: BGPENKB.TTF another is FGTshgyo.TTF
These are substantial files and I can't attach them to a list. if you need them
for testing I can send them to another email address, or upload them
I hope there's some simple encoding="voodoo" that might fix this. The problem
is, I guess, knowing *what* that voodoo is for arbitrary fonts (which can come
from any source).
Any assistance would not go amiss.
2D vector animation : https://savannah.nongnu.org/projects/things/
Font manager : https://savannah.nongnu.org/projects/fontypython/
More information about the Image-SIG