[reportlab-users] Verdana and TTF error

Ulrich Wisser reportlab-users@reportlab.com
Tue, 04 May 2004 17:13:50 +0200


Hi,

as was suggested earlier in the list I installed the VERDANA.TTF file on 
my Linux box. The file is found, but when I try to register the font 
like this

     pdfmetrics.registerFont(TTFont('Verdana', 'VERDANA.TTF'))

I get an error message (please find it below).

What is wrong with the font?


Thanks from sunny Stockholm

Ulrich



   File "/home/zope/Extensions/pdf1.py", line 211, in pdf1
   File "/home/zope/lib/python2.1/reportlab/platypus/doctemplate.py", 
line 628, in build
     self.clean_hanging()
   File "/home/zope/lib/python2.1/reportlab/platypus/doctemplate.py", 
line 344, in clean_hanging
     self.handle_flowable(self._hanging)
   File "/home/zope/lib/python2.1/reportlab/platypus/doctemplate.py", 
line 545, in handle_flowable
     f.apply(self)
   File "/home/zope/lib/python2.1/reportlab/platypus/doctemplate.py", 
line 103, in apply
     apply(getattr(doc,arn), args)
   File "/home/zope/lib/python2.1/reportlab/platypus/doctemplate.py", 
line 368, in handle_pageBegin
     self.pageTemplate.onPage(self.canv,self)
   File "/home/zope/Extensions/pdf1.py", line 108, in putLogo
     #    self.objects.append (object)
   File "/home/zope/lib/python2.1/reportlab/pdfbase/pdfmetrics.py", line 
556, in registerFont
     fonts.addMapping(ttname, 1, 0, font.fontName)
   File "/home/zope/lib/python2.1/reportlab/lib/fonts.py", line 131, in 
addMapping
     raise ValueError, "_tt2ps_map[%s]==%s already, not %s" % (repr(k), 
_tt2ps_map[k], psname)
ValueError: _tt2ps_map[('verdana', 1, 0)]==Verdana-Bold already, not Verdana