[reportlab-users] PDFMetrics.RegisterFont should walk into subdirectories

Robin Becker robin at reportlab.com
Tue Nov 24 09:56:13 EST 2009


Hosam Aly wrote:

> Hello,

>

> I am having a small problem with

> `reportlab.pdfbase.pdfmetrics.registerFont`. This method currently looks

> for fonts in the directories specified in `rl_config.TTFSearchPath`, but

> does not descend into subdirectories. This is problematic, because in

> Ubuntu 9.04 and 9.10 true type font files are in subdirectories of

> '/usr/share/fonts', and thus `registerFont` does not find them.

>

> I think `registerFont` should `os.walk` each of the directories in

> `rl_config.TTFSearchPath`.

>

......
that sounds like a relatively easy and safe thing to do. I'll have a go at that
this afternoon.
--
Robin Becker


More information about the reportlab-users mailing list