Re: List all fonts filename

Tim Roberts <[email protected]> Fri, 30 Dec 2022 18:24:17 -0800
Newsgroups gmane.comp.python.windows
Message-ID <[email protected]>
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,[email protected]
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-win32