[Image-SIG] PIL font file format?

Fredrik Lundh fredrik@pythonware.com
Wed, 15 Sep 1999 23:36:01 +0200


Robert Kern <kernr@ncifcrf.gov> wrote:
> FYI, I am almost finished with wrapping FreeType, a TrueType rendering
> engine, and I would like to write a TtfFontFile.py to handle converting
> from TrueType to the PIL font format, but I can't glean from the source
> of FontFile.py (or BdfFontFile or PcfFontFile) what information is 
> necessary for each glyph.

a better approach might be to provide a FreeTypeFont
object, which implements the ImageFont interface:

http://www.pythonware.com/library/pil/handbook/imagefont.htm

to render such fonts, simply pass FreeTypeFont instances
to ImageDraw's setfont method.

</F>