Skip to content Skip to sidebar Skip to footer

Why Is The Font Not Loading In Pfpd.add_font()?

I'm trying to add a font in pfpdf library to a generated pdf file but after moving a DejaVuSans.ttf to 'data' directory, font cannot longer be found. Here's a simplified code: from

Solution 1:

You have to delete the files with the .pkl extension in your Font directory for the front you want to use.

These files must be created when your script running because they contain all the configuration for your local font (path, prefix ...).

I think you have old font configuration and that's why it doesn't work.


Post a Comment for "Why Is The Font Not Loading In Pfpd.add_font()?"