[reportlab-users] Font Naming Problems

Robin Becker robin at reportlab.com
Wed Jul 6 10:41:47 EDT 2005


Barrett Gay wrote:
> In the pdfs that I am generating using Reportlab I am experiencing a 
> wierd problem.  The font names that I am setting have a trailing "+0" 
> when I open the pdf in Acrobat Professional.  Because of this I have to 
> manually change the font to their correct names.  Ex. "Tahoma" is 
> "Tahoma+0".  Is this something I am doing wrong?  Does it have something 
> to do with the Windows "\0" char?
> 
> Here is some example code:
> pdfmetrics.registerFont(TTFont('Tahoma', 'tahoma.ttf'))
> PDFCanvas.setFont('Tahoma', 8)
> PDFCanvas.drawCentredString(12.000000, 245.500000, '12B')
> 
> Thanks in advance,
> 
> Barrett Gay
..... These are TTF fonts so we aren't embedding the whole font file in the 
document, but rather a subset which is built up dynamically. The first subset is 
name+0 then name+1 etc etc etc.


I manage to read these files quite happily with reader, but I suppose it's 
possible that Professional wants to join all the fonts together some way.
-- 
Robin Becker


More information about the reportlab-users mailing list