[reportlab-users] CPU Loop in graphics caused by uppercase font filename

Roger crosseyedpenguin at cox.net
Wed Jan 10 11:18:28 EST 2007


I an a relatively new user and have been using the Reportlab 2.0
graphics package to produce vertical bar charts. Yesterday I tried to
change the default font from Times-Roman to Helvetica by passing a
fontName parameter (on Windows/XP):
lab = Label(fontName='Helvetica')

This caused a 100% CPU loop somewhere in the graphics package. By
trying various fonts, I found that I could specify Times-Italic and
Times-Bold without problem and the difference was that
pdfbase/_fontdata.py (~line 52) specified lowercase font filenames
(_a______) and my filenames for Helvetica were uppercase (_A______.PFB
and _A______.PFM). Renaming the font files to use a lowercase "a"
solved the CPU loop problem.

In addition to Helvetica, the case problem also exists for
Helvetica-Bold, Helvetica-Italic, Symbol, and ZapDingBats. I can easily
rename the files to fix the problem, the problem seems to be in finding
the correct fonts to download. Although I couldn't find the reference
this morning, I recall the docs pointed me to www.adobe.com as a source
for downloading the PFB/PFM fonts to be copied to the Reportlab/fonts
directory. I wasn't been able to find the fonts on the Adobe website
and ended up copying the fonts from a Acrobat 5 installation on an older
laptop. The newer versions of Acrobat do not seem to have the fonts.

For the record, can someone point me to the documentation on how I
should have acquired the correctly named fonts?

Roger





More information about the reportlab-users mailing list