[reportlab-users] TTF Problem

Ian Millington reportlab-user at agon.com
Fri Feb 24 11:23:12 EST 2006


Unusually, I have a TTF problem that isn't related to Far-East fonts.

I am trying to overlay standard military planning symbols onto a map, using
the common (in military circles) MapSymb font package. 

When I do:

pdfmetrics.registerFont(TTFont('ENEMY_Land',
'c:/windows/fonts/app6a01.ttf')) 
c = canvas.Canvas("test.pdf") 
c.setFont('ENEMY_Land', 16)
c.drawString(20,700,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012
3456789")
c.showPage()
c.save()

I get a set of 'no such character' boxes rather than the characters I need.
The same code works fine for other TTF fonts. What surprises me is that
there is no error, so I don't know if it's a silent font-parsing error, or
something really stupid I'm missing.

The fonts work in other applications. They are a dingbat fonts (i.e. symbols
mapped to ASCII character codes). Nothing funky with unicode going on. I can
zip and send one, if need be.

I'd appreciate any help in solving this, I don't really want to have to
manually draw these symbols in code.

Thanks

Ian.

--
Ian Millington - IPR Ventures
Tel: (+44/0)845 123 5715
Web: http://www.iprventures.com



More information about the reportlab-users mailing list