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

Glenn, Sidney G Sidney.Glenn at ca.com
Mon Jul 4 07:10:39 EDT 2005


Hi Folks

I sent this email around last week and to date I have received NO
replies. So I am concerned that it didn't reach its audience [hopefully
that is the case] and even more concerned that if it did then there
appears to be no resolution to the problem. 

As always any help would be most welcome

Cheers

Sidney

-----Original Message-----
From: Glenn, Sidney G 
Sent: Monday, 27 June 2005 4:19 PM
To: 'Support list for users of Reportlab software'
Subject: Issues with TTF Fonts [Arial]


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