1from reportlab.pdfbase import pdfmetrics
2from reportlab.pdfbase.ttfonts import TTFont
3
4pdfmetrics.registerFont(TTFont('Vera', 'Vera.ttf'))
5pdfmetrics.registerFont(TTFont('VeraBd', 'VeraBd.ttf'))
6pdfmetrics.registerFont(TTFont('VeraIt', 'VeraIt.ttf'))
7pdfmetrics.registerFont(TTFont('VeraBI', 'VeraBI.ttf'))
8
9canvas.setFont('Vera', 32)
10canvas.drawString(10, 150, "Some text encoded in UTF-8")
11canvas.drawString(10, 100, "In the Vera TT Font!")