[reportlab-users] Issues with TTF Fonts [Arial]

Glenn, Sidney G Sidney.Glenn at ca.com
Mon Jun 27 02:18:51 EDT 2005


Hi Folks

I am relatively new to reportlab and have been using it to generate
letters for a cancer department here in NZ. Whilst I have had success in
using the TTF Arial and more importantly Arial-Maori for printing
characters 32-127, I have not been able to get characters 128-160 and
192-253 to print. Whilst I don't need all of these charcters I do need
chr(228) and chr(235) Maori macrons when printing Tena koe [Dear] and
Naku noa, na [yours sincerely].

If I use Courier I have no problems in printing this range 

In the code I have used

pdfmetrics.registerFont(TTFont('Arial-Maori','E:\\Python24\\reportlab\\f
onts\\40533.ttf'))
pdfmetrics.registerFont(TTFont('Arial-Maori-Bold','E:\\Python24\\reportl
ab\\fonts\\4078f.ttf'))
pdfmetrics.registerFont(TTFont('Arial-Maori-Italic','E:\\Python24\\repor
tlab\\fonts\\40CEC.ttf'))
pdfmetrics.registerFont(TTFont('Arial-Maori-Bold-Italic','E:\\Python24\\
reportlab\\fonts\\40A59.ttf'))

addMapping('Arial-Maori', 0, 0, 'Arial-Maori')              #normal
addMapping('Arial-Maori', 0, 1, 'Arial-Maori-Italic')       #italic
addMapping('Arial-Maori', 1, 0, 'Arial-Maori-Bold')         #bold
addMapping('Arial-Maori', 1, 1, 'Arial-Maori-Bold-Italic')  #italic and
bold

Any help or pointers would be most welcome

Cheers

Sidney



More information about the reportlab-users mailing list