Query operating system fonts with pure Python on Windows.
Usually, you ship all the fonts needed for your game or app
with graphics, because fonts are important. But sometimes you
just need a fallback.
NOTES (Windows): In Windows fonts are referenced by name, which
is embedded into file. There is no official way to get filename
of the font through Windows API (manual loading or whatever).
This module exposes two functions:
Checks if specified system font is preset. The list of system
fonts is cached. To purge cache, use refresh parameter.
>>> import fontquery
Returns names of all system installed fonts.
0.6 - return sorted list of names without duplicates
0.5 - filter out vertical fonts (which names start with @)
0.4 - fix monospace font detection, patch by Claudio Canepa
0.3 - suport querying monospace fonts
0.2 - wrap font info into FontEntry objects
0.1 - initial release
Public domain work by anatoly techtonik <firstname.lastname@example.org>
Use MIT License if public domain doesn't make sense for you.