[reportlab-users] Using an OEM font

Andy Robinson andy at reportlab.com
Fri Oct 20 18:09:45 EDT 2006


Luc Saffre wrote:
> Hello,
> 
> I'd like to create PDF files with texts encoded in cp437 or cp850. 

> s=u'\u2500'*20
> 
> I guess that I must specify the right font to use --- but how?
> 

Chapter 3 of the user guide has examples of how to register Type 1 or 
TrueType fonts.  You need include a font with these characters in it in 
your distribution, or provide code which can find such a font n most 
common platforms.  The ones built into Acrobat Reader only support one 
256-byte character set at a time, and this is the Latin-1 character set.

Also reportlab/test has two scripts with running examples of font embedding:

   test_pdfbase_extrafonts.py
   test_pdfbase_ttfonts.py

Run these and study the resulting PDFs.

If you find common fonts with these characters, please let us know!


Nice utility!

Thanks,

Andy Robinson




More information about the reportlab-users mailing list