ImageFont family mojibake

View: New views
6 Messages — Rating Filter:   Alert me  

ImageFont family mojibake

by Donn-11 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

(Reposted to image-sig: I sent it to python-list by mistake.)
Python 2.6
PIL Version: 1.1.6-3ubuntu1              
libfreetype6 Version: 2.3.9-4ubuntu0.1

Hello,
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:

f=ImageFont.truetype("FGTshgyo.TTF",1,encoding="utf-8")
print f.font.family
'?????s????'

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
somewhere.

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.
\d
--
home: http://otherwise.relics.co.za/
2D vector animation : https://savannah.nongnu.org/projects/things/
Font manager : https://savannah.nongnu.org/projects/fontypython/
_______________________________________________
Image-SIG maillist  -  Image-SIG@...
http://mail.python.org/mailman/listinfo/image-sig

Re: ImageFont family mojibake

by Donn-11 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just a ping. I am not sure if this reached the list.

\d
_______________________________________________
Image-SIG maillist  -  Image-SIG@...
http://mail.python.org/mailman/listinfo/image-sig

Re: ImageFont family mojibake

by Donn-11 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Another ping. Is anyone seeing the OP?
\d
_______________________________________________
Image-SIG maillist  -  Image-SIG@...
http://mail.python.org/mailman/listinfo/image-sig

Re: ImageFont family mojibake

by Paul Moore-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/9/16 Donn <donn.ingle@...>:
> Another ping. Is anyone seeing the OP?
> \d

I see it. Just can't help...
_______________________________________________
Image-SIG maillist  -  Image-SIG@...
http://mail.python.org/mailman/listinfo/image-sig

Re: ImageFont family mojibake

by Donn-11 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks to Stani for letting me know I did reach the list. Seems I disabled my
receiving of email from the list a while back and I forgot about it.

I will get mail from now on, but am not sure if anyone weighed-in on the OP.
Is there any feedback? If so, is there a link to the archives somewhere?

Thanks, sorry for the noise.
\d
_______________________________________________
Image-SIG maillist  -  Image-SIG@...
http://mail.python.org/mailman/listinfo/image-sig

Re: ImageFont family mojibake

by Paul Moore-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/9/16 Donn <donn.ingle@...>:
> Thanks to Stani for letting me know I did reach the list. Seems I disabled my
> receiving of email from the list a while back and I forgot about it.
>
> I will get mail from now on, but am not sure if anyone weighed-in on the OP.
> Is there any feedback? If so, is there a link to the archives somewhere?
>
> Thanks, sorry for the noise.
> \d

I've seen 3 mails from you and no replies. Looks like nobody's been
able to help.
Paul
_______________________________________________
Image-SIG maillist  -  Image-SIG@...
http://mail.python.org/mailman/listinfo/image-sig