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:
pdfmetrics.registerFont(TTFont('Calibri', FONT_DIR + '/fonts/Calibri.ttf'))
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.
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!?
--Edit--
actually we discovered that there are some issues with reportlab and mod-wsgi. we switched to fast-cgi and never saw this problem again.