[reportlab-users] Using <b></b> with TTFont
Juha Tuomala
Juha.Tuomala at iki.fi
Fri Feb 9 04:43:27 EST 2007
On Monday 05 February 2007 20:11, Tim Roberts wrote:
> Remember that, in TrueType, a bold font is a completely different font
> file from the roman version. You have to register the bold version, and
> then tell Platypus how to find it. Something like this should work, I
> think:
>
> from reportlab.lib import fonts
> pdfmetrics.registerFont( TTFont( 'ArialBold', 'arialbd.ttf' ) )
> fonts.addMapping( 'arial', 1, 0, 'ArialBold' )
So, after using the bold tags with font label 'arial', it
should work automatically?
And addMapping syntax would be:
addMapping(<target label>, <bold, boolean>, ?, <source label>)
or did I miss something?
This kind of syntax definitions familar from UNIX man
pages I often miss when wading through the documentation,
quite often things are shown with example and like in
this case src and target example names are the same.
Not that testing it yourself would be impossible and
reading the source, but perhaps when updating the
docs that could be noticed.
BR,
Tuju
--
Ajatteleva ihminen tarvitsee unta.
More information about the reportlab-users
mailing list