2005. november 23., szerda

Retrieve list of installed fonts


Problem/Question/Abstract:

Retrieve list of installed fonts

Answer:

Is there an easy way to get all installed fonts in the Win95 system (for use in a font browser) without opening up the fonts directory and decoding the font names from all the font files?

Yes, it is really simple.
See the TScreen.Fonts property. Fonts is a string list object containing the names of the system's available fonts. Use the properties and methods of string list objects to retrieve the individual values.

You can also use the Assign method to copy the list to another string list object:

ListBox1.Items.Assign(Screen.Fonts);

Nincsenek megjegyzések:

Megjegyzés küldése