I'm having an issue with garbled fonts and I was hoping that
someone
might have some suggestions on how to fix them.
I'm trying to write some text (both Japanese and Roman
characters) using
Japanese fonts, but the output is just a random string of
lines if I am
below a specific size (18 for ipag-mona and 24 for
msgothic). I don't
seem to have this problem if I print roman characters using
a common
font (Arial for instance). Nothing seems to change even if I
use the
"encoding= <insert encoding here>" with the
ImageFont.truetype()
constructor.
I have included some example code that creates 8 small
bitmaps. 4 with
Japanese characters using various font sizes and 4 with
roman characters
using various font sizes.
Can anyone see something wrong with my code or have a
suggestion for a
different way to do this?
Thanks,
Tim
msgothic.ttc comes with the east asian language package for
MS Windows
(XP at least, I don't know about other versions).
ipag-mona.ttf can be downloaded from the following site:
http://www.geocitie
s.jp/ipa_mona/
Code was written for Python 2.5 and PIL 1.1.6 (downloaded
binary for
Win32 and Python2.5) under Windows XP SP2, Japanese Language
Edition
_______________________________________________
Image-SIG maillist - Image-SIG python.org
htt
p://mail.python.org/mailman/listinfo/image-sig
|