Fonts and PIL

G

Greg Lindstrom

Hello-
I'm running Python 2.3 on a windows box and would like to use PIL to
superimpose text over an existing pgn image. I have no problem getting
the text on the image but can not figure out how to manage fonts. How
to set the font style and size. From reading the archives I surmise
that I want to work with *.pil files. I've searched my box for the font
files but did not find them. I've googled for information on pil font
files and it appears to be involved with Zope. So, can any of you
honcho-level types help me out? How can I set font size and style in my
PIL application?

Thanks again!
--greg

--
Greg Lindstrom 501 975.4859
Computer Programmer (e-mail address removed)
NovaSys Health
Little Rock, Arkansas

"We are the music makers, and we are the dreamers of dreams." W.W.
 
?

=?ISO-8859-1?Q?Ulf_G=F6ransson?=

Greg said:
I'm running Python 2.3 on a windows box and would like to use PIL to
superimpose text over an existing pgn image. I have no problem getting
the text on the image but can not figure out how to manage fonts. How
to set the font style and size. From reading the archives I surmise
that I want to work with *.pil files. I've searched my box for the font
files but did not find them. I've googled for information on pil font
files and it appears to be involved with Zope. So, can any of you
honcho-level types help me out? How can I set font size and style in my
PIL application?

Pick a nice .ttf file and load it with ImageFont.truetype().

/ug
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Postgres and SSL 1
Recognizing the Arrival of a New File 2
Sharing Base Class members 0
Accessing Postgress from Windows 0
ODBC Connection on Windows XP 0
Using Paramiko 0
EDI x12 --> XML 1
Unzipping Files 1

Members online

No members online now.

Forum statistics

Threads
473,955
Messages
2,570,117
Members
46,705
Latest member
v_darius

Latest Threads

Top