[PythonReports-users] Font problem
Brought to you by:
a1s
From: Werner F. B. <wer...@fr...> - 2013-03-20 10:08:48
|
Hi, I wanted to start using a standard PDF font, so switched to Times-Roman but I get this exception with the attached report def. Can you give me some on hint on what I am doing wrong here. Werner KeyError: 'AAAAAA+CourierNewPSMT' File "c:\dev\twcbv4\twcbsrc\controllers\dreports.py", line 660, in <module> dlg.ShowModal() File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\_windows.py", line 805, in ShowModal return _windows_.Dialog_ShowModal(*args, **kwargs) File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\lib\agw\aquabutton.py", line 434, in OnLeftUp self.Notify() File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\lib\agw\aquabutton.py", line 864, in Notify self.GetEventHandler().ProcessEvent(evt) File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\_core.py", line 4154, in ProcessEvent return _core_.EvtHandler_ProcessEvent(*args, **kwargs) File "c:\dev\twcbv4\twcbsrc\controllers\dreports.py", line 391, in doReportWriteAndPreview pdfV.viewer.LoadFile(_filename) File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\lib\pdfviewer\viewer.py", line 196, in LoadFile self.DrawFile(self.frompage, self.topage) File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\lib\pdfviewer\viewer.py", line 473, in DrawFile self.page.extractOperators(), pdf_fonts) File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\lib\pdfviewer\viewer.py", line 565, in ProcessOperators drawlist.extend(self.DrawTextString(operand[0])) File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\lib\pdfviewer\viewer.py", line 630, in DrawTextString dlist.append(self.DrawTextItem(item, f)) File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\lib\pdfviewer\viewer.py", line 642, in DrawTextItem width = stringWidth(textitem, g.font, g.fontSize) File "c:\Python27\Lib\site-packages\reportlab-2.6-py2.7-win32.egg\reportlab\pdfbase\pdfmetrics.py", line 723, in stringWidth return getFont(fontName).stringWidth(text, fontSize, encoding=encoding) File "c:\Python27\Lib\site-packages\reportlab-2.6-py2.7-win32.egg\reportlab\pdfbase\pdfmetrics.py", line 689, in getFont return findFontAndRegister(fontName) File "c:\Python27\Lib\site-packages\reportlab-2.6-py2.7-win32.egg\reportlab\pdfbase\pdfmetrics.py", line 671, in findFontAndRegister face = getTypeFace(fontName) File "c:\Python27\Lib\site-packages\reportlab-2.6-py2.7-win32.egg\reportlab\pdfbase\pdfmetrics.py", line 630, in getTypeFace return _typefaces[faceName] |