VT510 Video Terminal Programmer Information

13 Defining and Loading ASCII Character Fonts

This chapter defines the ASCII character fonts and describes how to load the fonts.

13.1 Character Sets

In WYSE mode and ADDS Enhanced mode, desired characters can be acquired by loading them from various built-in character sets or by designing them using a pixel pattern*.

13.1.1 PCTerm on US Keyboard

The default and only character set supported for PCTerm on the US Keyboard is the PC International character set. This is a 256-character set, of which the first 128 characters form the PC Standard character set*.

*Refer to the IBM Code Page 437.

13.1.2 WYSE and ADDS Enhanced Personalities

WYSE mode and ADDS enhanced mode support ten built-in ROM character sets and four font banks, which are physical locations in memory. Each character set has 128 characters (Hex 00 to Hex 7F), thus each font bank has the same space allocation.

The character set must be loaded into a font bank to become an "active" character set. Characters cannot be displayed directly by calling their physical locations; they can only be displayed through a series of steps to make them active. First, the primary and secondary logical character sets are defined by pointing to the desired font banks. Then, the active character set is defined for the terminal to display and receive codes. See Table 13–1 on how to display and load character sets.

Table 13–1 Display and Load Character Sets
Step Description
1. Load font bank with built-in character set Load a target character set from one of the ten built-in character sets into a font bank.
or Define and load character Design a character and load it into a font bank.
2. Define logical character set Define primary or secondary character set to point to the font bank.
3. Select active character set Set active character set to point to either a primary or a secondary character set.

WYSE 160: You can display all 512 characters in the four font banks on the screen at the same time.

WYSE 50+: You can only display one font bank on the screen at a time.

Figure 13–1 shows the process for selecting character sets.

Figure 13–1 Process of Selecting Character Sets

The VT510 selects a character set from one of the built-in character sets by the following process. Refer to Table 13–1 for details.

  1. Load the character sets into the font banks.
  2. Define the primary and secondary character set from the font buffers.
  3. Select which character set will be the active characters set.

Changing a character set in a font bank may change the active character set if the active character set and primary/secondary character set happen to point to the same font bank.

13.2 Loading, Defining, and Selecting Character Sets

Table 13–2 shows how to load, define, and select the character sets. The word "same" in Table 13–2 signifies the same control sequences as in the WYSE 160/60 column.

Table 13–2 Loading Font Bank
Load Font Bank1 WYSE TVI ADDS
160/60 PCTerm 150/120 WY 50+ 950 925 910+ A2
Load ROM-resident character set into one of the four font banks.2 ESC c @ Bank Charset
n/a same same n/a n/a n/a EnH
Parameters: Bank Description
0 Font Bank 0
1 Font Bank 1
2 Font Bank 2
3 Font Bank 3
Charset Character Set Selected
@ (4/0) or ` (6/0) Native
A (4/1) or a (6/1) PC Multinational
B (4/2) or c (6/3) or d (6/4) Standard ASCII
C (4/3) Graphics 1
D (4/4) or b (6/2) PC standard
E (4/5) Graphics 2
F (4/6) Graphics 3
G (4/7) or H (4/8) or g (6/7) US ANSI
N (4/14) or j (6/10) ISO Latin-1 Supplemental
I (4/9) or e (6/5) ANSI Supplemental
Define Logical Character Set
Primary Character Set ESC c B Bank n/a same same n/a n/a n/a EnH
Secondary Character Set ESC c C Bank n/a same same n/a n/a n/a EnH
Select Active Character Set3
Primary Character Set (default) ESC c D n/a same same n/a n/a n/a EnH
Secondary Character Set ESC c E n/a same same4 n/a n/a n/a EnH
Automatic Font Loading
On (default) ESC e O n/a same same n/a n/a n/a n/a
Off ESC e N n/a same same n/a n/a n/a n/a
Clear Font Bank
Erase a character set from one of the four font banks.1 ESC c ? Bank n/a same same n/a n/a n/a EnH

1If not redefined, the default primary character set is Native/Wyse 50+ in Font Bank 0; the secondary character set is PC Multinational in Font Bank 1.

2Example: To load Bank 1 with the Multinational character set, enter: ESC c @ 1 A
This sequence is sent to the terminal. If ACK mode is on, the terminal returns an ACK to indicate that the font has loaded successfully.

3The default active character set, including that for TVI mode, is Native/Wyse 50+.

4See Note on the following page.

13.3 Designing a Character Font

Table 13–3 shows how to design a character font.

Table 13–3 Design a Character Font
Define and Load a Character WYSE TVI ADDS
160/60 PCTerm 150/120 WY 50+ 950 925 910+ A2
Design a character font ESC c A Bank Pp bb..bb Ctrl/Y
n/a same same n/a n/a n/a EnH

The sequence in Table 13–3 defines the bb..bb string and loads it in the Pp position of the Bank font bank.

Bank is the font bank that holds a defined character set. Refer to Table 13–2.

Pp is a 2-byte Hex code in the range of 00 to 7F specifying a position in that font bank.

bb...bb is a Hex code string defining the bit pattern of the defined character. The string contains one of the following:

The command aborts if Ctrl/Y in the sequence is received before the expected number of Hex codes in bb...bb is received.

Perform the following steps to draw a graphic character in a 10 × 16 cell:

  1. Divide the cell into 10 × 16 pixels and draw the desired font pattern. Observe the following rules:
    1. Start the pattern from the left column in the cell.
    2. For an alphanumeric character, the pattern should occupy only the left seven columns; for other graphic characters, the pattern can extend to the eighth column. (The ninth and tenth column follow whatever you place in the eighth column.)
    3. If possible, leave some space at both the top and bottom pixels to allow for spacing.
  2. Turn the font pattern into a value represented as 1s and 0s; where "1" represents a filled pixel, and "0" represents an empty pixel.
  3. Encode the bit pattern, 4 bits (a nibble) at a time, row by row, into hexadecimal numbers 0 to F. (Do not encode the right two columns.)
  4. Form the two nibbles per row into a 2-byte Hex code.
  5. Feed the 16 Hex codes into the bb...bb string. See the following example.

Load the following character into position 31 (Hex) in Font Bank 3.

         MSB           LSB
Bit -->   7 6 5 4 3 2 1 0 A B     Hex Code
        1                         00
        2                         00
        3 X X X X X X X X         FE
        4 X             X         82
        5 X             X         82
        6 X             X         82
        7 X             X         82
        8 X X X X X X X X         FE
        9 X             X         82
       10 X             X         82
       11 X             X         82
       12 X             X         82
       13 X X X X X X X X         FE
       14                         00
       15                         00
       16                         00
       17                         00

Use the following sequence to load this graphic character:

ESC c A 3 31 00 00 FE 82 82 82 82 FE 82 82 82 82 FE 00 00 00 00 Ctrl/Y

Once loaded, the font remains in the font bank until: