[reportlab-users] Re: Font Naming Problems

Barrett Gay barrett.gay at c4solutions.net
Wed Jul 6 12:13:22 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

Robin,

Thanks for the quick reply.  To clarify, I can open and view the 
document in Acrobat, however if I try and edit the text is when I have 
problems.  But it sounds like my problem is the fact that I am not 
embedding the font, so is there a way to do this?  If not are there any 
alternatives?

Thanks again,

Barrett


More information about the reportlab-users mailing list