473,387 Members | 1,535 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,387 software developers and data experts.

PIL font encoding

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
Jun 27 '08 #1
0 889

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: Steve Holden | last post by:
Laszlo Nagy wrote: 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 --...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.