Moi15 Moi wrote:
My goal is to list all the filename of the font installed without listing the file in those 2 folders:- C:\Windows\Fonts - %userprofile%\AppData\Local\Microsoft\Windows\FontsI found a way to do it directwrite: https://gist.github.com/JeremieBergeron/dc04bcb747c94a82a10020a990ba884aBut, from what I can see, pywin32 doesn't support directwrite api.
It's just COM, which pywin32 does perfectly well. The advantage of COM is that you don't need a custom interface. Did you look at the pyglet code that does this?
But, I don't know how I get the font path (ex: C:\Users\Admin\AppData\Local\Microsoft\Windows\Fonts\Jester.ttf) with GDI
The easier way would be to read the registry. "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" is where Windows stores the registered fonts. The key is the font name, the value is the file name. If there is a file name without a path, it defaults to C:\Windows\Fonts.
-- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc.
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32