When the user uninstall the program with pip uninstall FontCollector, it won't clear the font cache.
To actually clear the cache, the user needs to call FontLoader.discard_system_font_cache() and FontLoader.discard_generated_font_cache().
It seems that it isn't possible to run custom code when the user do a pip uninstall FontCollector. See Custom code on pip uninstall.
Because of that, I don't really know how I could clear the font cache on uninstall.
Edit (27-02-2025): I asked here how to implement it, but it doesn't seems possible.
When the user uninstall the program with
pip uninstall FontCollector, it won't clear the font cache.To actually clear the cache, the user needs to call FontLoader.discard_system_font_cache() and FontLoader.discard_generated_font_cache().
It seems that it isn't possible to run custom code when the user do a
pip uninstall FontCollector. See Custom code on pip uninstall.Because of that, I don't really know how I could clear the font cache on uninstall.
Edit (27-02-2025): I asked here how to implement it, but it doesn't seems possible.