[Contents] [index] [Help] [Retrace] [browse <] [Browse >]

Font information for a screen comes from a number of different places.

sa_font
    The application may specify the font to be used in a screen by
    providing the SA_Font tag with a textattr structure.  in this case,
    the font will be used by the screen and will be the default font for
    the rastport of any window opening in the screen.

sa_sysfont, 0
    If the application requests the user's preferred monospace font, it
    is taken from gfxbase->defaultfont.  any window's rastports are also
    initialized to use this same font.

SA_SysFont, 1
    The screen font selected by the user from the Preferences font editor
    may be used for the screen by using the SA_SysFont tag.  This font,
    the "preferred screen font", may be proportional.  For compatibility
    reasons, if this font is specified for the screen, the window's
    rastport will be initialized to gfxbase->defaultfont (a
    non-proportional font).

To access information on an open screen's font, the application may
reference screen.font or drawinfo.dri_font.  these fonts are identical,
the drawinfo structure simply provides an alternate method of accessing
the information.  Note that Screen.Font is a pointer to a textattr
structure and that DrawInfo.dri_Font is a pointer to a textfont structure.
The application may use whichever form is best suited to its requirements.

It is illegal to change the screen's font after the screen is opened.
This means that the font specified in the screen and drawinfo structures
is guaranteed to remain open as long is the screen is open.

The menu bar, window titles, menu items, and the contents of a string
gadget all use the screen's font.  The font used for menu items can be
overridden in the menu item's intuitext structure.  under v36 and higher,
the font used in a string gadget can be overridden through the
stringextend structure.  the font of the menu bar and window titles cannot
be overridden.

For more information on screen fonts, see the description of the sa_font
and sa_sysfont tags in the "screen attributes" section above.