Alec Bennett wrote: > Thanks for the tips. > > Using that method I'm able to obtain the filename for about 75% of the fonts > in my Windows directory, but I can't resolve fonts with names such as this: > > - the font's name is Arno Pro. It shows up in font choosers with names like > "Arno Pro", "Arno Pro Caption", "Arno Pro Display", etc. > > - however, no such names appear in the Windows font directory/registry. This > font appears as, for example, "ArnoPro-Regular", "ArnoPro-Caption", > "ArnoPro-Display". > > I don't imagine you can think of a way to obtain the file name for fonts with > that sort of naming convention? >
Yecch. Yes, this is ugly. TrueType font have several names, including a "full name" and a "PostScript name", where the PostScript name must be ASCII and usually has no spaces. I'm not sure I have an answer for this problem. In the worst case, I suppose you could do like GIMP does, and scan through %SystemRoot%\Fonts on your own. You could cache the information so you only checked files that had changed. The alternative is to go through the trouble of constructing a ctypes wrapper for GetOutlineTextMetrics. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32