On 12/23/22 6:29 AM, Moi15 Moi wrote:


Is it possible to list all the fonts filename with pywin32?

From what I can see, it is possible with the GetFontData <https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-getfontdata> from GDI.

GetFontData is certainly available in pywin32, as are most Win32 APIs.  However, it only returns information about one font at a time -- the font that is currently selected into that DC.

You can use EnumFontFamilies or EnumFontFamiliesEx, available in win32gui.

http://timgolden.me.uk/pywin32-docs/win32gui__EnumFontFamilies_meth.html

https://stackoverflow.com/questions/5760594/pywin32-enumfontfamilies-breaks-python

--
Tim Roberts,t...@probo.com
Providenza & Boekelheide, Inc.
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to