[reportlab-users] single font for document
Something Special
dailylama at gmail.com
Mon Feb 12 13:37:35 EST 2007
Hello,
how to globally(for current pdf only) set reportlab to use my font?
I mean, to allow encodings:
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.lib.fonts import addMapping
pdfmetrics.registerFont(TTFont('Times', 'Times.ttf'))
pdfmetrics.registerFont(TTFont('TimesI', 'TimesI.TTF'))
pdfmetrics.registerFont(TTFont('TimesB', 'TimesBD.TTF'))
pdfmetrics.registerFont(TTFont('TimesBI', 'TimesBI.TTF'))
addMapping('Times', 0, 0, 'Times')
addMapping('Times', 0, 1, 'TimesI')
addMapping('Times', 1, 0, 'TimesB')
addMapping('Times', 1, 1, 'TimesBI')
But this seems to work for Paragraphs only - inside a table it shows
black squares.
More information about the reportlab-users
mailing list