[reportlab-users] registerFont stays how long in memory? what s the best place to register a font?
thomasspin at gmail.com
Tue Apr 13 06:13:03 EDT 2010
I'm wondering what is the best time to register a font for use in reportlab.
I added the following line into my settings.py in django:
pdfmetrics.registerFont(TTFont('Calibri', FONT_DIR + '/fonts/Calibri.ttf'))
the settings.py is called the first time when the server starts.
After this call the font is available for pdf generation. But it occurs that
after a few days the font is not available anymore and I have to restart the
django app, which leads to a re-registering of the font.
One approach I already tried was registering the font before each pdf
generation call, which did not worked since it crashed each 3-5 call. Thats
the reason why I put it in a place which is just called once at the
I just want to know if the settings.py is the correct place to register a
font for reportlab and if yes, what could be the reason that the font is not
available after a few days anymore!?
would be great to find some help here!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the reportlab-users