AFont()
This function asks Windows for font information and creates an array containing the results. It's a maddeningly schizophrenic function: the format of the array changes depending on how many parameters you pass. You can ask for a list of fonts, for font sizes for a particular font, or whether a particular font and size is installed. In each case, the form of the answer is different. Usage | lReturnValue = AFONT( FontArray [, cFontName [, nFontSize ] ]) |
Parameter | Value | Meaning |
FontArray | Array Name | The array to contain the font information. |
cFontName | Omitted | Create a list of all installed fonts. |
Character | Get information for the specified font. | |
nFontSize | Omitted | Get all font sizes available for cFontName; if cFontName is scalable, create a single row containing -1. |
Numeric | Determine if cFontName is available in nFontSize. If so, create a single row containing .T. | |
lReturnValue | .T. | The array was created containing the specified information. |
.F. | The specified font/size combination doesn't exist and no array was created. |
Example | ? AFONT(aFonts) && Create a list of all available fonts ? AFONT(aCourier, "Courier") && Check sizes for Courier ? AFONT(aAvailable, "MS Sans Serif",8) && Check for particular && font/size combination |
See Also | Array Manipulation, GetFont() |
View Updates
Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.