[reportlab-users] RenderPM and TTF fonts

Nizam Sayeed ibnameen at gmail.com
Tue Oct 9 18:20:59 EDT 2007


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 1
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.

-- Nizam Sayeed

On 10/9/07, Nizam Sayeed <ibnameen at gmail.com> wrote:

>

> Hi there,

>

> I have a quick question. Does RenderPM support TTF fonts? And if so, how

> do I do this? I wanted to use a unicode font because I will need to create

> charts that will display French text. Thanks.

>

> Best regards,

>

> -- Nizam Sayeed

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20071009/c98542bb/attachment.html>


More information about the reportlab-users mailing list