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

56 views
Skip to first unread message

Yan Seiner

unread,
Jan 22, 2014, 6:01:58 PM1/22/14
to reportl...@lists2.reportlab.com
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.
_______________________________________________
reportlab-users mailing list
reportl...@lists2.reportlab.com
http://two.pairlist.net/mailman/listinfo/reportlab-users

Andy Robinson

unread,
Jan 23, 2014, 2:25:05 AM1/23/14
to reportlab-users
Can you post a snippet of code showing us what you are doing to find,
register and use your fonts?

Thanks,

Andy
--
Andy Robinson
Managing Director
ReportLab Europe Ltd.
Thornton House, Thornton Road, Wimbledon, London SW19 4NG, UK
Tel +44-20-8405-6420

Yan Seiner

unread,
Jan 23, 2014, 9:54:58 AM1/23/14
to reportl...@lists2.reportlab.com
HAH!

Thanks for pointing out the obvious.

I overlooked a file called "fontconfig.py" where all the fonts to be
used are defined.

I added my fonts and all is well.

:)

--Yan
Reply all
Reply to author
Forward
0 new messages