[reportlab-users] Fonts - reportlab pics serif no matter what I do

Yan Seiner yan at seiner.com
Wed Jan 22 18:01:58 EST 2014

I'm a relative newbie in the world of reportlab.

The issue I am having is that reportlab apparently does not like the
fonts I have, and substitutes FreeSerif fonts instead of the FreeSans
fonts I want to use.

If I remove all of the FreeSerif fonts and just use the FreeSans fonts,
Reportlab fails with an error that it can't find the font info for the
family of fonts:

Can't map determine family/bold/italic for freesans

If I tell it to use serif fonts, the entire document is printed in serif
just fine.

If I tell it to use sansserif fonts, some of the document elements use
sansserif and some use serif.

I tried using my own fonts (DejaVu) and got the same font family error
from reportlab/lib/fonts.py:

Can't map determine family/bold/italic for dejavusans

Where do I look? The little bit I've been able to gather on that error
is that maybe my sansserif font set is not complete, but the whole
DejaVu set is there....

I looked at the code for reportlab/lib/fonts.py but AFAICT the error is
being generated due to an empty map.

I'm stuck.

More information about the reportlab-users mailing list