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"})
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
  In addition, you can 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.
  The default is ANSI, character set 0.
chan Logical file number or channel.
*GUIFONT Keyword representing the dialogue font used by standard MS Windows applications for dialogues.
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.
*SYSFONT Keyword representing the default graphical system font - typically
"System,0.66,B".
 
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=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) and *GUIFONT (standard MS Windows dialogue font). These fonts will change based on OS Version and theme. The new special font names may be used anywhere a font specification is given.
 
Example f$="MS Serif"; ? 'FONT'(LIST F$) ! returns sizes for MS Serif font:
13,16,19,21,27,35,10,11,
0100 PRINT 'FONT'("MS Serif",-11)


*Note* 'FONT' works with *WINPRT* but not with direct-to-device printers. See


*WINPRT* Windows Printing.