'FONT' Define/List Fonts
GUI Display/Printer
Formats
1. | Define Font (with Specification): | 'FONT'(name$,size[,attrib$[,angle]]) |
2. | Define Font (via Special Names): | 'FONT'({"*SYSFONT" | "*GUIFONT" | "*CURFONT"}) |
3. | List Channel's Fonts: | 'FONT'(LIST*[,chan]) |
4. | List Fonts, Properties: | 'FONT'(LIST PROPERTIES FOR [name$][,chan]) |
5. | List Sizes for a Font: | 'FONT'(LIST name$) |
Where:
angle | Slant for printing, in degrees. Optional. | ||||||||||||||||||||||||||||||||
attrib$ | Font attributes. Optional string expression. Valid codes include:
You can also control the character set:
| ||||||||||||||||||||||||||||||||
chan | Logical file number or channel. | ||||||||||||||||||||||||||||||||
*CURFONT | Keyword representing the current graphic font being used. (added in PxPlus v10.10) | ||||||||||||||||||||||||||||||||
*GUIFONT | Keyword representing the dialogue font used by standard MS Windows applications for dialogues. | ||||||||||||||||||||||||||||||||
*SYSFONT | Keyword representing the default graphical system font, typically "System,0.66,B". | ||||||||||||||||||||||||||||||||
name$ | Font name. String expression. Font must exist in the system. | ||||||||||||||||||||||||||||||||
size | Numeric. Use positive values for font sizes relative to the current default for the device (.5 for half size, 2 for double, etc.). Use negative sizes for absolute font size in points. |
Description
'FONT' defines the current font and specifications. It can also be used to return comma-delimited font and property (attribute) lists for the channel (default is the terminal) or a size list for a specific (existing) font.
Two special font names may be used in place of the specifications:
*SYSFONT | Default graphical system font | |
*GUIFONT | Standard MS Windows dialogue font |
These fonts will change based on the operating system version and theme. The new special font names may be used anywhere a font specification is given.
A new *CURFONT font may be specified, which indicates that the system should retain the current font selected. (as of PxPlus v10.10)
See Also
*PDF* PDF Print Interface
*WINPRT* Windows Printing
Example
f$="MS Serif";
print 'font'(list F$) ! Returns sizes for MS Serif font: 13,16,19,21,27,35,10,11,
print 'font'("MS Serif",-11)