[reportlab-users] TTF fonts and PFB files

Robin Becker robin at reportlab.com
Wed Jul 4 06:42:19 EDT 2007

Oleh Slabkiy wrote:

> Hello,


> Can you explain me, please, one thing. I use True Type Font Arial

> Unicode MS for generating PDF and charts. Using of TTF fonts needs PFB

> files. I don't understand why do we need to use PFB files if we

> already have TTF file? As I understand, PFB files uses for Type 1

> fonts, but not for True Type, but when there are no this files it

> gives me an error, that it cannot set font Times-Roman (pay your

> attention, that it says about Times-Roman when I use Arial). And if

> this files are necessary, which of them do we need? There are 16

> files:

The default fonts used by both the PDF and PM renderers are type 1 and require
the pfb files for the initial font at least. You'll get an error from the PM
renderer if it cannot find the initial pfb. If you then use TTF fonts you don't
need any more pfb/afm files. So it should be possible to use the ms-unicode font
etc etc.

> _a______.pfb

> _ab_____.pfb

> _abi____.pfb


> Zx______.pfb

> Zy______.pfb


> I need to make a possibility to generate any symbols of any languages

> (latin, cyrylic, asian, chines, japan, anything else...)



The symbols available in a given font are determined by the font file so to get
Japanese you'll need the right ttf file.

Robin Becker

More information about the reportlab-users mailing list