Setting the current font in a report¶
setfont() |
Set the current font in a report |
SYNTAX
setfont(name, size, style)
Set the current font in a report.
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.
name |
The font name, e.g. “Arial”, “Helvetica”. To keep the current font, specify sys.FontName. |
size |
The required size in points. To keep the current size, specify sys.FontSize. |
style |
The required style flags. To keep the current style, specify sys.FontFlags. The valid styles are defined in Font style flags in the standard include file $SCULPTOR/include/printer.h. If more than one style is required, they should be separated by the bitwise or operator |. |
NOTES
An alternative method of changing the current font is to change the value of the Sculptor system variable sys.PageWidth. This variable is updated by the setfont function.
EXAMPLE
setfont("Arial", 12 , FONT_NORMAL)
setfont(sys.FontName, sys.FontSize, FONT_BOLD | FONT_ITALIC)
setfont("Courier", 10, sys.FontFlags)
setfont(sys.FontName, sys.FontSize, sys.FontFlags &~FONT_UNDERLINE)
RELATED TOPICS |