After you have created PFM files for your printer's fonts, you should create a character-translation table (CTT). To create a CTT for a font, scroll through the CTT window and highlight the desired character-translation. Then, double click the selection to display the CTT dialog box for the selected font file.
A CTT is used by RasDD to map characters from the Windows ANSI character set to the printer character set to identify the printable characters. The current version of this set contains 256 entries.
RasDD provides support for some of the common code pages and symbol sets to eliminate redundancy in a large number of individual printer drivers and permits individual driver to support the less common ones. RasDD currently supports the following predefined CTTs:
CTT ID | CTT (Code Page) |
-1 | IBM Code Page 437 |
-2 | IBM Code Page 850 |
-3 | IBM Code Page 863 |
If the device font uses extended characters that match either code page 437, 850, or 863, a minidriver can use one of the predefined CTTs provided by RasDD. In this case, enter the CTT ID for the CTT in the Trans Tab control of the PFM dialog box. CTTs provided by RasDD are referenced from the minidriver through negative numbers that correspond to the resource ID values (from RasDD).
When the printer uses the same extended characters for all device font, such as most dot-matrix printers, a minidriver can define the CTT as follows:
1.Specify a CTT through the Default CTT in the ModelData dialog box and set the Trans Tab value in the PFM dialog box in each PFM file to zero.
2.Set the Trans Tab values in each PFM file to the appropriate CTT ID value.
For more information, see Printer Font Metric Structure.
Note If a single CTT is used for the font set, the value can be entered in the Default CTT control of the ModelData dialog box. If RasDD uses a driver-supplied CTT, the Default CTT value is a positive integer. The Default CTT is zero if RasDD does not use a single CTT. For more information, see Model Data.
Printer drivers supporting device with less common code pages and symbol sets contain their own CTT resources. A given minidriver can mix and match these types of CTTs as needed. CTTs provided by the minidriver are referenced by positive numbers corresponding to the resource ID values (from the minidriver).
When the printer uses a different set of extended characters for each font, such as the HP LaserJet IIP, the minidriver sets each Trans Tab value in each PFM file to the CTT ID value that is appropriate for that font. After the extended character set(s) for the known device fonts is determined, the CTT dialog box is used to create unique CTTs for the device's remaining characters to specify which character codes map to which printer symbols.
Note The sample in this section displays the CTT dialog box with the EPSONXTA.CTT file for the Diconix 150 Plus printer. No sample is provided for the HP LaserJet IIP.
If the font does not use extended characters (either does not print them, or the characters are italicized versions of the characters below ASCII 127), a CTT is not needed. For these printers, set the Last Char in the PFM dialog box to 127 (or to the last printing ASCII value). In this case, the Default Char in the PFM file is used when an extended character is requested.
When you finish entering data in the CTT dialog box:
·Click the Save button to accept additions or changes to the CTT file.
·Click the Save As button to save the CTT using another name or storage location.
First Character
The First Char control identifies the first character in the CTT. The first character in the translation table is 127. Characters below the First Char do not use the CTT and are sent directly to the printer.
Note The extended characters used by the HP LaserJet IIP printer vary depending on the individual font.
Last Character
The Last Char control identifies the last character in the CTT. Because the CTT for the EPSONXTA.CTT file character set supports characters 127 through 255, this value is 255.
Character Codes
The remaining controls in the CTT dialog box specify a character code or device-command/character-code sequence and maps it to a particular entry in the Windows ANSI set. For example, suppose character code 161 in the Windows ANSI character set is an inverted exclamation point. If this character is available on the printer, place the required printer commands in box 161 in the CTT. If the character is not available, place the default character for that font in that location in the CTT.
There are three formats for the contents of a CTT file. Unitool determines which one is to be used to save a CTT file based on the information entered:
·1-to-1 (byte to byte) translation (effectively a translation table). Each character code consists of a single byte. For simple remappings, RasDD sends the character value entered in the edit control each time the ASCII value is shown.
·2-to-1 (two bytes to one byte) translation. Each character code consists of either one of two characters. RasDD sends the first character value that was entered in the edit control, and then use either a backspace character or x-movement command (as defined in the DI_BKSP_OK control) to move the current position back to the original position. Then, RasDD sends the second character to overprint the first. If null, the second character is not set. This is used to overstrike characters, such as the slash and zero to produce a slashed zero.
·Variable-length translation. Each character code consists of a variable length string containing printer commands that change printer modes to gain access to a particular character, such as symbol set switching in the LaserJet family. RasDD sends the commands entered in the edit control when requested.
The differences between these formats is transparent to the user. Unitool creates the CTT in a format that results in the smallest file size depending on the actual translation. Printer commands sent from the CTT do not change the permanent state of the printer.