How to Enumerate Installed Fonts?

You can talk about anything related to LB Booster here, not covered in another category
PabloSl
Posts: 2
Joined: Mon Jun 15, 2020 10:16 pm

How to Enumerate Installed Fonts?

Post 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
guest
Site Admin
Posts: 190
Joined: Tue Apr 03, 2018 1:34 pm

Re: How to Enumerate Installed Fonts?

Post 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.
PabloSl
Posts: 2
Joined: Mon Jun 15, 2020 10:16 pm

Re: How to Enumerate Installed Fonts?

Post 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
guest
Site Admin
Posts: 190
Joined: Tue Apr 03, 2018 1:34 pm

Re: How to Enumerate Installed Fonts?

Post 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