If you don't have a GUI library to use, TTFQuery+Fonttools will retrieve
this information:
from ttfquery import _scriptregistry
fonts = _scriptregistry.registry.fonts.keys()
fonts.sort()
for name in fonts:
print name
if you do have a GUI, your GUI library will almost certainly have a
mechanism to retrieve the list of fonts. With wxPython, for instance,
it's called wxFontEnumerator. If you just want the user to choose a
font, most GUI libraries already have controls/dialogues that can handle it.
TTFQuery is going out, reading the .ttf fonts with Fonttools and storing
their metadata in an index for faster access, whereas your GUI library
will be using a simple API call to retrieve the metadata. That means
TTFQuery is going to be heavier, but it can, for instance, also give you
information about fonts not installed on the system.
HTH,
Mike
TTFQuery:
http://ttfquery.sourceforge.net/
I am attempting to extract the Font Names from the installed windows fonts.
I am having a heck of a time getting these rather than the file names.
Examples can be seen by going to Control Panel > Fonts
Any help or direction is appreciated.
S
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
PyCon is coming...