Page 1 of 1

How to Enumerate Installed Fonts?

Posted: Mon Jun 15, 2020 10:19 pm
by PabloSl
Hello,

I would like to have a listbox filled with the Windows installed fonts. Any code greatly apreciated.

Thank you in advance.

-Pablo

Re: How to Enumerate Installed Fonts?

Posted: Tue Jun 16, 2020 10:31 am
by guest
PabloSl wrote: Mon Jun 15, 2020 10:19 pmI would like to have a listbox filled with the Windows installed fonts. Any code greatly apreciated.
A Google search found this but it's quite old (1999) and works by exporting the font list from the registry, so I don't know how compatible with 'modern' Windows it is likely to be. It also needs tweaking to run in LBB.

Preferably use the Windows EnumFonts (or EnumFontFamilies) API function, although I've not tried it myself.

Re: How to Enumerate Installed Fonts?

Posted: Tue Jun 16, 2020 7:33 pm
by PabloSl
Thank you for the info. But I have no idea how to translate that C stuff into something useful. Can somebody translate that to LB? TIA.

-Pablo

Re: How to Enumerate Installed Fonts?

Posted: Fri Jun 19, 2020 1:33 am
by guest
Have you considered using the standard Windows Choose Font dialog? If there is some way you could use that, it would be simpler than creating your own font selector using a LB listbox:

Image