Searching for UTF8 capable font for REPORTLAB

Marijan Tadin mtadin66 at
Mon Jan 19 05:45:48 CET 2004

Try following code, replace value of my_location_of_TTF with your
location of TTF (of course you should have TT fonts somewhere on your
machine, on windows they are allways there, AFAIK you can download them
for linux):

There is also mailing list on ReportLabs website, it is where I found
the hint how to use ReportLab and Unicode.

from reportlab.pdfgen import canvas
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont

canv = canvas.Canvas('test_03.pdf')
fontname = 'CS'

my_location_of_TTF = 'C:\WINNT\FONTS\comic.TTF'

canv.drawString(50,100,'Some text:'+a.encode('UTF8'))

"Andreas Jung" <lists at> wrote in message
news:mailman.429.1074256100.12720.python-list at
> Reportlab has some problems with creating PDFs from UTF8 encoded text.
> this reason
> they are using a truetype font rina.ttf which looks *very ugly*. Does
> anyone know of a
> suitable free available truetype font that works with UTF8?
> -aj

More information about the Python-list mailing list