home *** CD-ROM | disk | FTP | other *** search
- 3 DISKFONT LIBRARY
-
- 3.1 OPEN THE DISKFONT LIBRARY
-
- The Diskfont Library must have been opened before you may use
- the functions listed in this file.
-
-
- /* Declare a pointer to the Diskfont library: */
- struct Library *DiskfontBase;
-
- /* Open the Diskfont Library: */
- DiskfontBase = (struct DiskfontBase *)
- OpenLibrary( "diskfont.library", 0 );
-
- if( !DiskfontBase )
- exit(); /* Could NOT open the Diskfont Library! */
-
-
- /* ... */
-
-
- /* Close the Diskfont Library: */
- CloseLibrary( DiskfontBase );
-
-
-
- 2.2 FUNCTIONS
-
- AvailFonts()
-
- This function will scan through the font directory of the
- system disk, and return a complete list of available fonts.
-
- Synopsis: missing = AvailFonts( buffer, size, type );
-
- missing: (long) If the buffer was not big enough to store
- the complete list of fonts in the extra number of
- bytes needed is returned. If 0 is returned the
- buffer was big enough for a complete list of fonts.
-
- buffer: (char *) Pointer to some memory were the list of
- fonts can be stored.
-
- size: (long) The size of the buffer (in bytes).
-
- type: (long) If you want to look for available fonts
- which are already in the memory set the flag
- "AFF_MEMORY". If you want to search the disk for
- available fonts, set the flag "AFF_DISK". To
- search both the memory and the disk set both flags
- with the binary OR operator between:
- "AFF_DISK | AFF_MEMORY".
-
-
-
- OpenDiskFont()
-
- To load fonts from the disk and open them use the
- OpenDiskFont() function. Note that you must have opened the
- DiskFont Library before you may call this function. Remember
- to close all fonts you have opened!
-
- Synopsis: font = OpenDiskFont( attr );
-
- font: (struct TextFont *) Pointer to a TextFont structure
- or NULL if OpenFont() could not find the font.
-
- attr: (struct TextAttr *) Pointer to an initialized
- TextAttr structure. OpenDiskFont() will try to open
- the font which closes matches your requirements.
-
-
-
-