User`s guide
4-37
Printer, Plotter, and Spooler Subsystem Programming
The Ti and To attributes in the printer–dependent colon files define the possible flow of the
translating code set. The Ti attribute specifies the combination of the input and process
code sets:
[Input_code_set, ... ]Process_code_set, ...
The To attribute specifies the combination of the process and output code:
Process_code_set [Output_code_set0, Output_code_set1,
Output_code_set2, Output_code_set3,... ], ...
For example, the To attribute for a Japanese printer is defined as:
::To::IBM–932[IBM–932, IBM–932, IBM–932], ibm–eucJP[IBM–932,
IBM–932, IBM–932,IBM–932]
All characters of the character set ID (CSID) are printed using ROM fonts when an output
code set is specified for each CSID. Otherwise, bitmap images from the Xwindows font are
used. The type of Xwindows font files, including the font image of each CSID, is selected by
reading a file from the /usr/lib/X11/nls directory.
Printer Code Page Translation Tables for Multibyte Code Sets
A translation table consists of maps between code points that are not shared by the two
code sets. A printer backend can communicate with other code sets even if the code set is
not supported by the iconv subroutine by using a translation table provided in the
/usr/lib/lpd/pio/transJP directory.
When an input or an output code set is not supported by the iconv subroutine, the
unsupported code set translates one of the code sets that are supported or directly to a
process code set using the translation tables found in the /usr/lib/lpd/pio/transJP directory.
Users with root authority can add new code sets for printers by creating translation tables.
The naming convention for new translation tables is FromCodeSetName_ToCodeSetName.
All translation tables must be defined in the trans_dir file. The f_cp from code point in a
translation table must be sorted in alphabetical order in advance.
The trans_dir and codeset.alias files are in the /usr/lib/lpd/pio/transJP directory. The
trans_dir file format is:
FromCodeSetName ToCodeSetName NameofTranslationFile
Code set aliases are defined in the codeset.alias file. The codeset.alias file format is:
CodeSetName AliasName ...
For example, to print an MBCS file that was written with a new code set on an IBM–932
printer follow these steps:
1. Create a translation table in the /usr/lib/lpd/pio/transJP directory. The naming
convention for the new file is NewCodeSetName_IBM–932.
2. Define the translation table in the trans.dir file. The format to define a new code set
named NewCodeSet is:
newcodeset IBM–932 newcodeset_IBM–932
3. Define the alias name in the trans.alias file, if needed.
4. Append the code set name as input code in a colon file, for example:
::Ti::[NewCodeSetName, ...]IBM–932, ...
Using Xwindows Fonts with the qprt Command
MBCS printer backends use Xwindows fonts defined in the /usr/lib/X11/fonts directory to
print characters that are not stored in the ROM of the printer. The –F and –I (uppercase i)
flags for the qprt command designate Xwindow fonts for the printer. The default value of
these qprt command options are specified in the colon files as the value of the _F and _I
attributes.