[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

       OpenDiskFont - load and get a pointer to a disk font.

       font = OpenDiskFont(textAttr)
       D0                  A0

       This function finds the font with the specified textAttr on
       disk, loads it into memory, and returns a pointer to the font
       that can be used in subsequent SetFont and CloseFont calls.
       It is important to match this call with a corresponding
       CloseFont call for effective management of font memory.

       If the font is already in memory, the copy in memory is used.
       The disk copy is not reloaded.

       textAttr - a TextAttr structure that describes the text font
               attributes desired.

       D0 is zero if the desired font cannot be found.

       As of V36, OpenDiskFont() will automatically attempt to
       construct a font for you if:

               You have requested a font size which does not exist
               as a designed font, and

               You have not set the DESIGNED bit in the ta_Flags
               field of the TextAttr, or TTextAttr struct.

       Constructed fonts are created by scaling a designed font.
       A designed font is one which typically resides on disk,
       or in ROM (e.g., a font which has been designed by hand
       using a drawing tool).  Designed fonts generally look better
       than fonts constructed by the font scaler, but designed
       fonts also require disk space for each font size.

       Always set the DESIGNED bit if you do not want constructed fonts,
       or use AvailFonts() to find out which font sizes already exist.

       As of V37 the diskfont.library supported built-in outline
       fonts.  Then in V38 the outline font engine was moved to
       a new library, "bullet.library."

       This routine will not work well with font names whose file
       name components are longer than the maximum allowed
       (30 characters).

[Back to Amiga Developer Docs]