Cache
By default, pyfonts
caches font files to improve performance. But you can disable this behaviour by setting use_cache=False
in the load_font()
and load_google_font()
functions, and manually clearing the cache with clear_pyfonts_cache()
.
pyfonts.clear_pyfonts_cache(verbose=True)
Cleans the entire font cache directory by deleting all cached font files.
Parameters
verbose
: Whether or not to print a cache cleanup message. The default value is True.
Usage
from pyfonts import clear_pyfonts_cache
clear_pyfonts_cache()