Retrieving current print font style (sys.FontFlags)¶
!temp sys.FontFlags,,u4 |
Current font style |
The style flags of the current print font. This variable is read-only. It may be used in the setfont() function to retain the current style flags while changing the font name or font size.
The valid styles are defined in Font style flags in the standard include file <printer.h>.
To test whether a style flag is currently set, use the bitwise and operator (&):
if (sys.FontFlags & FONT_ITALIC)….
The bitwise and operator (&) is used rather than the equals to operator (=) because several styles may be set at any one time. The clause evaluates to non-zero (TRUE) if the style flag is set, otherwise zero (FALSE).
The default print font is stored in the printer parameter file, Section 3 (Standard control sequences), entry 5 (Initialise printer). The default printer parameter file is printer.
RELATED TOPICS |