[reportlab-users] PDF created in ReportLab looks awesome in Foxit, awful in Adobe

Robin Becker robin at reportlab.com
Mon Jul 16 07:35:55 EDT 2012

On 14/07/2012 02:53, Marc Tompkins wrote:


> fFont = 'Bitstream Vera Sans Mono' #in production, this would be the

> user's selection


> regFont = fFont

> boldFont = fFont + ' Bold'

> fontSize = fontSetting[fFont][2]

> fileNameReg = fontDir + os.sep + fontSetting[fFont][0]

> fileNameBold = fontDir + os.sep + fontSetting[fFont][1]

> pdfmetrics.registerFont(TTFont(regFont, fileNameReg))

> pdfmetrics.registerFont(TTFont(boldFont, fileNameBold))


> Each of these fonts renders my report properly in both the Foxit and Adobe

> Readers; many others that I tried did not. Also, each of them is licensed

> to allow commercial use/distribution (generally as long as you include the

> license file), which many others were not. I'm afraid I didn't keep notes

> of the sites where I found them, but the names ought to be enough for

> Google.


> Just thought I'd post this follow-up for the benefit of future sufferers...


> Thanks for a wonderful package, by the way!


It's still not clear what the underlying problem is though. I assume that the
issue doesn't have anything to do with our technology per se since if all are
TTF it may be assumed that the PDFs have the same information in them; we subset
the fonts by default. Could it be that the hints need things that we are
ignoring in our sub-setting procedure? I'm using windows xp and don't appear to
have consolas, but I assume that if we are including the sub-setted font in your
document it shouldn't make a difference. When I look at the sample document on
windows with acrobat reader 10 I don't see much of a problem with the sample

I checked on arch linux with acroread 9 and the document looks awful. Presumably
the acroread rendering is just busted for this font.
Robin Becker

More information about the reportlab-users mailing list