Places information about available fonts into an array.
Syntax
AFONT(ArrayName [, cFontName [, nFontSize]])
Returns
Logical
Arguments
ArrayName
Specifies the variable array into which the names of available fonts are placed. If the array is not large enough to contain all the fonts, Visual FoxPro automatically increases the size of the array. If you specify an existing two-dimensional array, Visual FoxPro changes the array to a one-dimensional array.
If the array is successfully created, AFONT( ) returns true (.T.); otherwise, AFONT( ) returns false (.F.).
cFontName
Specifies a font for which information is placed into the array.
If the font you specify supports only discrete font sizes (8-point, 10-point, ...), the font sizes are stored to the array and AFONT( ) returns true (.T.). If the font you specify in cFontName is scalable (supports fractional font-size values), the array has a single element containing –1 and AFONT( ) returns true (.T.).
If the font you specify is not available, the array isn't created and AFONT( ) returns false (.F.).
nFontSize
Specifies a size for the font specified in cFontName.
If the font size nFontSize is available for the font specified in cFontName, the array has a single element containing a true (.T.) value and AFONT( ) returns true (.T.). If the font size is not available for the specified font, the array is not created and AFONT( ) returns false (.F.).
Remarks
AFONT( ) places the names of available fonts into an array. It can also be used to determine available font sizes or if a font is scalable. Use GETFONT( ) to display a dialog containing available fonts, font sizes, and styles.