473,399 Members | 3,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Re: PIL font encoding

Laszlo Nagy wrote:
def getfnt(size):
return ImageFont.truetype("cartoon.ttf",size,encoding='un ic')

Using the above function, I cannot draw special german characters. E.g.

u'L\xfctgendorf'
It will print "Lutgendorf" instead of "Lütgendorf". Much more
interesting is that I can also do this:

def getfnt(size):
return
ImageFont.truetype("cartoon.ttf",size,encoding='pu t_somethin_here_it_has_no_effect
WHAT?????? ')

Same results. Shouldn't the truetype constructor raise an exception if
the encoding is invalid and/or not available with the selected font?

BTW my "cartoon.ttf" font is able to print "Lütgendorf". I have tested
it from GIMP. So I'm 100% sure that the problem is with PIL.

Thank you,

Laszlo

You will be more likely to find assistance for this specific issue via
the image-SIG mailing list, see

http://mail.python.org/mailman/listinfo/image-sig

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Jun 27 '08 #1
0 773

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: kmunderwood | last post by:
I am having trouble changing the font size when extracting xml into an html web page. I think it can be done so many ways, that my searches bring up examples that I am not familiar with. I am a...
2
by: Tom Van Overbeke | last post by:
Hi, I created a web page that displays a logfile monitor i wrote for monitoring our servers. it refreshes every minute and displays a text file in an iframe. I'd like to reduce the font size so...
2
by: Barry | last post by:
Hi all, I'd like to implement a Gaelic tutorial with the inclusion of Gaelic fonts. Irish Gaelic has 18 letters - abcdefghilmnoprstu but vowels can also take an acute accent, called a fada...
13
by: Emanuele Calo' | last post by:
Hi, I've defined a CSS with this selector: #IUPBarCode{ font-family : "3 of 9 Barcode"; font-size: 30px; font-weight : normal; position: absolute; top: 150px; left: 22px; }
20
by: B Wooster | last post by:
There is a page that shows Firefox 1.0 render text differently for CSS as compared to FONT FACE for one particular font: http://www.aczoom.com/fonts/xdvng.ttf is the font that does not work. ...
53
by: Andrew Poulos | last post by:
I've got some CSS that looks like this: body { margin: 0; font-family: Arial, Helvetica, sans-serif; font-size: 140.01%; color: #000000; } but IE won't apply the font size to text in table...
5
by: Christian Stapfer | last post by:
After switching from Python 2.3 to 2.4 (Enought), PIL throws an exception that did not occur formerly (under Python 2.3) when executing ImageFont.truetype(font, size) where font =...
8
by: Erwin Moller | last post by:
Hi group, I could use a bit of guidance on the following matter. I am starting a new project now and must make some decisions regarding encoding. Environment: PHP4.3, Postgres7.4.3 I must...
0
by: Laszlo Nagy | last post by:
def getfnt(size): return ImageFont.truetype("cartoon.ttf",size,encoding='unic') Using the above function, I cannot draw special german characters. E.g. u'L\xfctgendorf' It will print...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.