Inquire available memory and disk fonts.
Source position: diskfont.pas line 106
function AvailFonts( |
Buffer: PChar; |
BufBytes: LongInt; |
Flags: LongInt |
):LongInt; |
Buffer |
|
memory to be filled with TAvailFontsHeader followed by an array of TAvailFonts elements, which contains entries for the available fonts and their names. |
BufBytes |
|
the number of bytes in the buffer |
Flags |
|
AFF_MEMORY is set to search memory for fonts to fill the structure, AFF_DISK is set to search the disk for fonts to fill the structure. AFF_SCALED is set to not filter out memory fonts that are not designed. Any combination may be specified. AFF_TAGGED is set to fill the buffer with TTAvailFonts elements instead of TAvailFonts elements. |
if non-zero, this indicates the number of bytes needed for AvailFonts in addition to those supplied. Thus structure elements were not returned because of insufficient bufBytes.
AvailFonts fills a user supplied buffer with the structure, described below, that contains information about all the fonts available in memory and/or on disk. Those fonts available on disk need to be loaded into memory and opened via OpenDiskFont, those already in memory are accessed via OpenFont. The TTextAttr structure required by the open calls is part of the information AvailFonts supplies.
When AvailFonts fails, it returns the number of extra bytes it needed to complete the command. Add this number to your current buffer size, allocate a new buffer, and try again.