[Image-SIG] write text on a picture

Fei Xu feix@rutchem.rutgers.edu
Fri, 9 May 2003 10:59:12 -0400


HI! Riardo:
When I had my system adminstrator to install the fonts file, we could not
download it from http://effbot.org/pil/pilfonts.zip, because the webpage
has changed much.  We also tried to find the fonts file on web but failed.
Would you like to tell me other links from which I can download the fonts
file? Or sent the fonts file to me by email, if you'd like.
I really appreciate your help.
Fei

On Mon, 7 Apr 2003, Ricardo Niederberger Cabral wrote:

> On Mon, 7 Apr 2003 18:49:32 -0400
> Fei Xu <feix@rutchem.rutgers.edu> wrote:
> 
> > HI! Everyone: I am using pytohn image library to draw a picture with some
> > text on it.  I can draw things like circles, etc, which means my python
> > library works well. But I can't write text on it. 
> > >>>write.text((0, 0, 100,100), 'red') Traceback (most recent call last):
> 
> Try something like:
> 
> ifo=ImageFont.load("courB12.pil")
> draw.text((0,0),caption,(100,100,100),font=ifo)
> 
> where:
> (0,0) is the text coordinate
> (100,100,100) is the text color RGB triple
> caption is a string
> "courB12.pil" is the filename of an existing pil font file. (you may need to include full path if not in current dir)
> (I believe a corresponding courB12.pbm must also exist at the same path)
> 
> You can get some pil fonts at http://effbot.org/pil/pilfonts.zip
> 
> Best regards,
> ---
> rnc <nieder|at|mail.ru>
>