Unit 'diskfont' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#morphunits]

AvailFonts

Inquire available memory and disk fonts.

Declaration

Source position: diskfont.pas line 294

function AvailFonts(

  Buffer: PChar;

  BufBytes: LongInt;

  Flags: LongInt

):LongInt;

Arguments

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.

Function result

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.

Description

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.


Documentation generated on: 2021-07-30