GetAvailableFonts -- retrieve list of available fonts (V4.7)
t = GetAvailableFonts()
This function scans all fonts installed on the current computer, puts them into a table, and returns the information to you. This is useful to check if a specific font is available without calling SetFont() or OpenFont().

The table returned by this function will consist of several subtables. One subtable for each font. The subtables have the following elements initialized:

The complete font name (i.e. family name plus style). For example, "Arial Bold Italic".

The family name of this font, e.g. "Arial".

The weight of this font. This will be set to one of the following weight constants:


The slant style of this font. This will be set to one of the following slant constants:


True if this font is a bitmap font, False if it is a vector font. Vector fonts can be freely transformed and antialiased.

If the font is a bitmap font this will be a table containing a list of available sizes for the font. If the font is a vector font, this table will be empty.

Please note that there is no guarantee that all calls to OpenFont() or SetFont() will succeed with the fonts returned by this function. It can often happen that OpenFont() and SetFont() will fail with a specific font although it was returned in the available table by this function. This is because GetAvailableFonts() returns the available fonts for all Hollywood font engines. When you call OpenFont() or SetFont(), however, only one font engine can be specified. So if a call to OpenFont() fails although the font was returned by GetAvailableFonts(), then this is a sign that you are using the wrong font engine to open this font. Simply switch font engines in that case and it should work correctly.


a table containing all available fonts
t = GetAvailableFonts()
For Local k = 0 To ListItems(t) - 1
  DebugPrint("Family:", t[k].Family, "Weight:", t[k].Weight,
             "Slant:", t[k].Slant, "Bitmap:", t[k].Bitmap)
The code above lists all fonts available on this system.

Show TOC