font Parameter

Sets attributes of a font.

Scope: View

Syntax

query font.FontName 
set font.FontName [bold] [italic] [ underline] [reverse]
                  [Foreground] [/ Background] ["Description"] 

Options

FontName 
The name of the font to be set. This can be one of the following:
Letter 
An uppercase letter, where Letter can be represented by:
nn 
A decimal-based ASCII character code, where nn is a numeric value between 65 and 90, inclusive. For example, character code 65 = A.
xnn
xnnn 
A hexadecimal-based ASCII character code, where n is a digit of value 0 to 9, inclusive, or an alphabetic character of value A to F or a to f, inclusive. Valid hexadecimal values for nn range from 41 to 5A, inclusive. For example, character code x41 = A.
keypress 
An alphabetic keyboard keypress of value A to Z, inclusive.
background 
Background character font.
block 
Marked block font.
bold 
Displays the text in bold font.
context
Context lines font.
fill 
Fill character font.
highlight 
Highlighting font.
italic 
Display the text in italic font.
overlay 
Overlay lines font.
prefixentry 
Prefix entry font.
prefixtext 
Text part of prefix data.
prefixnumber 
Numeric part of prefix data.
space 
Space area font.
symbol 
Displayed symbols font.
underline 
Underline the text.
bold 
Displays the selected font in bold face.
italic 
Displays the selected font in italic face.
underline 
Displays the selected font as underlined characters.
reverse 
Displays the foreground color as the background, and the background color as the foreground.
Foreground 
The foreground color. Specify either the color number or its corresponding default color name, which can be any one of:
   Color #     Default Value 
  ---------------------------
      1        black
      2        blue
      3        green
      4        cyan
      5        red
      6        pink
      7        brown
      8        light gray 
      9        gray
     10        bright blue
     11        bright green
     12        bright cyan 
     13        bright red 
     14        bright pink 
     15        yellow
     16        white
/Background 
The background color, which can be any color number or name from the list above. You must include the / in the command string.
Description 
Description of the token type associated with the font character. It is displayed in the Fonts/colors secondary window.

Description

The font parameter sets the attributes (color and typeface) for fonts. There are two types of font: symbolic and special.

Symbolic fonts are specified with a single character, either alphabetic, numeric, or special, and can be used to set font strings to highlight parts of a file. For example, the C parser uses font C to highlight comments. The load macro for C files, c.LXL, sets this font to an italic typeface in cyan on white. Any character may be used but numeric fonts (1-9) are normally used for overlay lines only.

Special fonts perform predefined functions. They are:

background 
Sets the attributes of the background character.
block 
Sets the attributes of a marked block.
context 
Sets the attributes of the protected file lines displayed to provide context (if the context parameter is on).
fill 
Sets the attributes of the fill character (the area between the left edge of the file and the beginning of the text in a formatted file.)
highlight 
Sets the attributes of those lines whose classes match one of those in the highlighted class list.
overlay 
Sets the default font of overlay lines.
space 
Sets the font of the space area (the area between the end of an line and the right edge of the file.)
symbol 
Sets the attributes of the symbols displayed, when the symbols parameter is on.

The fonts set for each of these types takes effect within the current file view. That means that the colors and typeface for marking blocks (block), for example, can be displayed in different colors in different file views.

Examples

  1. To change the background color of font A to blue, type:
    set font.A /blue
  2. To reverse the colors of a marked block from red on black to black on red, type:
    set font.block reverse 
  3. To set the font for overlay lines, type either of the following lines:
    set font.overlay yellow/red
    set font.overlay 15/5
  4. To query the font effect and colors used for overlay lines, type :
    query font.overlay

API Return Codes

-2 
The FontName specified for the set font command was not found. Check the spelling and form of the FontName in the command string. You can also use the query fontlist command to list the current FontNames.
-1 
The FontName specified was not valid. Check the syntax requirements for the parameter and issue the parameter again.

background Parameter
color Parameter
fontlist Parameter
fill Parameter
highlight Parameter
overlay Parameter
space Parameter
block Command