gdamjan at gmail.com
Thu Oct 28 10:17:32 CEST 2004
>>from reportlab.pdfbase import pdfmetrics
>>from reportlab.pdfbase.ttfonts import TTFont
>>fontname = 'Arial-Bold'
>>my_TTF = '/opt/Fonts/arial.ttf'
>>font = TTFont(fontname, my_TTF)
> Do you realize that arial.ttf is normal Arial, and not bold? Arial bold
> lives in arialbd.ttf.
Ahh, stupid copy/paste...
the exception was raised when fontname = "Arial" ...
the above example doesn't raise an exception, and it was experiment.
> Reportlab automatically registers the Arial family. You shouldn't need to
> register it yourself.
it seems that I can't register "Arial" as fontname since Reportlab does it
automatically... in the end, fontname = 'MyArial' did fine.
More information about the Python-list