[reportlab-users] RenderPM and TTF fonts
ibnameen at gmail.com
Wed Oct 10 14:23:59 EDT 2007
I do have the Vera fonts installed. The font registers fine because I can
use it when rendering PDFs using renderPDF but when I try to use renderPM to
create a PNG, it gives the error about not being able to find T1 files. As
you said, renderPM does not support TrueType fonts yet.
I am currently using a Type 1 font with renderPM. But this wont work because
I display Unicode characters.From what I know, the Type 1 standard does not
support Unicode characters. And TrueType is not supported on renderPM. So
what other option is there?
On 10/10/07, Robin Becker < robin at reportlab.com> wrote:
> Nizam Sayeed wrote:
> > I saw an example in the code and did this:
> > pdfmetrics.registerFont( ttfonts.TTFont( "Vera", "Vera.ttf" ) )
> > But I am getting this error:
> > Can't setFont(Vera) missing the T1 files? Originally
> > exceptions.AttributeError: TTEncoding instance has no attribute 'vector'
> > I guess it does not handle TTF fonts. So what is the solution when
> trying to
> > display unicode text using RenderPM? I had converted my TTF font to Type
> > using ttf2pt1 but it does not seem to preserve the unicode glyphs. I was
> > getting this error when trying to use the converted font:
> > 'utf8' codec can't decode bytes in position 10-12: invalid data
> > What can I do? Any help would be greatly appreciated.
> the renderPM extension does support true type fonts. I suspect something
> wrong with your installation if there's no Vera font in the
> reportlab/fonts folder
> this script runs fine on my machine
> from reportlab.pdfbase import ttfonts, pdfmetrics
> My reportlab/fonts folder contains the following related files
> >> I have a quick question. Does RenderPM support TTF fonts? And if so,
> >> do I do this? I wanted to use a unicode font because I will need to
> >> charts that will display French text. Thanks.
> >> Best regards,
> >> -- Nizam Sayeed
> Robin Becker
> reportlab-users mailing list
> reportlab-users at reportlab.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the reportlab-users