# Mnemonics

'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:
& | Underscore the character following the "&" (as in hot keys)
B | Bold
C | Center text
F | Show focus lines around text
I | Italics
N | Numeric data alignment
R | Right justify text
S | Fills only text background (not whole region) with chosen colour
U | Underscore ("_")
W | Word wrap
# | Same as N
#### Note: Use the 'TEXT' mnemonic to specify vertical alignment settings (Top, Middle, Bottom). You can also control the character set:
! | Use symbol character set (char. set 2)
O | Use OEM character set (char. set 255)
J | Use Japanese character set (char. set 128)
D | Use character set 1 or current default for the given font
%nnn | Use specific Windows character set nnn (Default is ANSI, character set 0)
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. As a rough guide to equivalent sizes: Point size -12 = 6 LPI, 10 CPI Point size -10 = 7.2 LPI, 12 CPI Point size - 7 = 10 LPI, 16 CPI

## 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)

#### Note:
'FONT' works with *WINPRT*, the Windows console, and *PDF* but not with direct-to-device printers.

## 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)