This chapter introduces the Thai printing support provided by the Tru64 UNIX operating system. It describes the supported printers, the print file formats, printing features, and the maintenance procedures for supporting Thai printing.
The Tru64 UNIX operating system supports text printers with built-in Thai fonts. The Thai text printing support follows the Wototo (WTT) specification. The Tru64 UNIX operating system supports Thai printing on PostScript printers in three ways:
For information on the supported printer types and print filters, see Chapter 4, Local Language Devices.
The Tru64 UNIX operating system supports printing of mixed ASCII and Thai characters in the following print file formats:
The print filters for PostScript printers can automatically detect the format of a print file and convert it to the proper format for printing.
The Tru64 UNIX operating system supports the printing features described in the following sections.
Font faulting is a mechanism for saving memory required by fonts. With font faulting, font information is stored in either:
The font information is loaded into the printer on demand, thus conserving printer memory.
The font-faulting mechanism is useful in a desktop printing environment, where a large number of different fonts is required. In this case, simultaneously storing all the fonts reduces the available memory, and therefore speed, of the printer. It is also possible that the number of required fonts is so large that all fonts cannot be stored in memory at the same time.
Font faulting for single-byte fonts is done on a per font basis. Single-byte fonts are small and relatively simple, so loading the whole font is efficient.
The font-faulting mechanism can be used with the following printers:
See Section 8.5, Setting Up Thai Printing for information about configurating these printers.
The generic wwpsof PostScript filter preloads the font data required by a print job, along with the print job itself, to the printer. Therefore, a job printed with the wwpsof print filter might consume more printer memory and print slower than a job printed using the font faulting mechanism. However, using the wwpsof printer allows you to print Thai characters on all available PostScript printers rather than just a few. See Section 8.5, Setting Up Thai Printing, for more information about configuring the wwpsof filter.
The Tru64 UNIX operating system provides a large set of outline fonts for printing files in various languages. Depending on how many local language support subsets are installed on your system, more than 150 outline fonts may be available.
The outline font for Thai printing is described in detail in Chapter 5.
Different Thai dot matrix printers may support different internal codes for Thai printing. To ensure the internal code of a printer can be set up correctly, you must specify the printer ID (that is, the model and brand registration ID) through the yp parameter in the /etc/printcap file. The format of printer ID follows the WTT specification:
[bb][mm][nn]
where
bb is the Brand ID representing the brand name of the printer
mm is the Model ID representing its model number
nn is the Printer Code ID specifying the internal character code
The details of the registered printer ID can be found in the WTT specification.
For each supported printer code, a mapping table is provided to convert the print file code to the printer codes. The code conversion tables are stored in the following location:
/usr/lbin/tac_data/tac11xnn.cod
where nn is one of the valid Printer Code IDs.
To support the printing of text files with nroff control sequences on a Thai dot matrix printer, the generic text print filter, thailpof, reads the printer description table of the printer and generates the appropriate control sequences. Printer description tables are stored in the following location:
/usr/lbin/tac_data/bbmm.tab
where bb is the Brand ID and mm is the Model ID.
Alternatively, you can specify other character code tables by passing the
tacdata=<tac data path> option to the lpr command through the -A flag.
A printer description table describes the escape sequences used by the printer for printing with the underline, superscript, and subscript attributes. Each line in this table contains an escape sequence name, as defined in Table 8-1, and its escape sequence code (in hexadecimal). Comments can be added to the table by entering an exclamation mark (!) as the first character in the line.
!++ ! printer table : /usr/lbin/tac_data/epb4.tab ! description :escape sequences table for Epson LQ1050+ !- subscript 1B 53 31 ! ESC S 1 x_subscript 1B 54 ! ESC T superscript 1B 53 30 ! ESC S 0 x_superscript 1B 54 ! ESC T underline 1B 31 ! ESC 1 x_underline 1B 30 ! ESC 0 reset 1B 40 ! ESC @
Escape Sequence Name |
Meaning |
---|---|
subscript |
Subscript starts |
x_subscript |
Subscript ends |
superscript |
Superscript starts |
x_superscript |
Superscript ends |
underline |
Underline starts |
x_underline |
Underline ends |
reset |
Reset printing attributes |
Under certain circumstances, when standard above vowels or tone marks are combined with other Thai characters, they may overlap each other or there may be too much space between them.
To support the printing of high quality Thai documents, the Thai outline fonts are specially encoded to include a supplementary set of above vowels and tone marks, in addition to those defined in TIS 620-2533. The printing position of these additional characters is slightly adjusted to handle the spacing problems of certain combinations of Thai characters. During printing, the above vowels or tone marks defined in TIS 620-2533 are mapped, according to rules, to appropriate characters in the supplementary set, resulting in better print quality. This technology is called text morphing.
To enable the text morphing capability, you specify the tm option to the lpr command through the -A flag.
As there is currently no standard way of text morphing, the set of rules supported by the Tru64 UNIX operating system applies only to Thai fonts shipped by HP. If you use Thai fonts from other vendors, carefully verify the output from the print queue with text morphing before making the printer available to all users.
Many English character-cell terminal applications cannot properly handle non-spaced Thai characters. The problem is severe when Thai text needs to be aligned in columns with spaces between them. The space compensating mode addresses this problem. For details, see Section 9.2.8, Thai Character Output.
The Tru64 UNIX operating system supports space compensating mode for printing Thai text files. By default, the space compensating mode is disabled.
To enable the space compensating mode for printing, you can specify the spcom option to the lpr command by using the -A flag.
For those Thai text printers which support three-pass printing, Thai characters of different display levels are printed on three separate lines. The Tru64 UNIX operating system allows you to print the three output levels in a more compact region, occupying only 1.5 lines. This is called half-height printing.
To enable the half-height printing capability, you can specify the onehalf option to the lpr command by using the -A flag.
Before you configure printers to utilize the printing features supported by the Tru64 UNIX operating system, you should understand some commands and daemons used in print configuration. This section discusses them in detail; the next section illustrates how they are used for configuration.
In addition to the usual options to the lpr command, the -A option is added to pass the country-specific parameters. You can also use ya to set these parameters in the /etc/printcap file. For example, the parameters can be specified with the -A option as:
% lpr -A "flocale=th_TH font=LilyUPC-Light plocale=th_TH" <file>
The same set of parameters, when defined in the /etc/printcap file appear as follows:
:ya="flocale=th_TH font=LilyUPC-Light plocale=th_TH":\
If you supply parameters using the-A option to the lpr command, they override the corresponding default values in the /etc/printcap file.
The following parameters are applicable to Thai printing:
Specifies the locale for the source text file. The printer filters use this locale to validate the characters inside the source text file. If this value is not set properly, the text will be interpreted using the current locale. In the Thai printing environment, this value is particularly important in order for the lpr command to correctly interpret the characters.
Specifies the locale for the printer. If the printer has built-in fonts, the plocale value should match the codeset of the built-in fonts. If the printer uses the font faulting mechanism, the value of plocale should match the font used to print the text file.
Specifies the font name for printing the source text files in a PostScript printer. This is valid for printing text files only; PostScript files are tagged with the required font name.
Enables space-compensation mode. In Thai, nonspacing characters can combine with other characters for display and therefore do not occupy space. Many of the tools for text alignment do not properly handle nonspacing characters. If you want to print Thai output from such utilities, you must enable space compensation mode to ensure proper text alignment.
Space compensation is done line by line. The print filter counts of the number of nonspacing characters found in a line. When two or more consecutive spaces are encountered, the print filter inserts the appropriate number of spaces, thereby compensating for spaces added by the nonspacing characters.
Enables text morphing for Thai printing. Text morphing replaces some characters with others to produce better output in desktop publishing environments. Text morphing rules are proprietary to fonts. Therefore, text morphing is supported only by Thai outline fonts and is available only for PostScript printing.
Enables half-height printing. When enabled, Thai characters are printed on one and a half lines, rather than on three lines, to produce more compressed and natural-looking output. This option, however, slows down the printing speed. The onehalf option works only with the thailpof print filter.
Specifies where the character code and control sequence tables for the printer are located. The printer ID that follows the Wototo specification specifies the table to be used. The yp value in the /etc/printcap file defines the printer ID. The default path is /usr/lbin/tac_data.
Specifies the number of lines per page. When used with the -w command, this option can be used to control the font size and orientation of the output.
A PostScript font management utility, pfsetup, is provided for setting up print queues to use the font faulting mechanism. This utility has the following syntax:
pfsetup [-s] [-d] [queue_name...]
The options to the pfsetup command are defined as follows:
If you do not specify an option, pfsetup displays the information about the print queues that have been set up with this utility. If you do not specify a particular queue name, pfsetup processes every applicable queue.
In setup mode, pfsetup displays all PostScript printer fonts available on the system and prompts you to select the fonts or font headers to be downloaded onto individual print queues. For example:
% /usr/sbin/pfsetup -s ====================================================== Printer queue: lp1 | 1 | d11152W No font has been setup for downloading in queue lp1 These are fonts available in your system for downloading. Fonts chosen for downloading are marked with * 1 Hei-Light-CNS11643 2 Sung-Light-CNS11643 3 Hei-GB2312-80 4 XiSong-GB2312-80 5 Munjo 6 AngsanaUPC-Bold@ 7 AngsanaUPC-BoldItalic@ 8 AngsanaUPC-Italic 9 AngsanaUPC-Light 10 CordiaUPC-Bold 11 CordiaUPC-BoldItalic 12 CordiaUPC-Italic 13 CordiaUPC-Light 14 EucrosiaUPC-Bold 15 EucrosiaUPC-BoldItalic 16 EucrosiaUPC-Italic 17 EucrosiaUPC-Light 18 FreesiaUPC-Bold 19 FreesiaUPC-BoldItalic 20 FreesiaUPC-Italic 21 FreesiaUPC-Light 22 IrisUPC-Bold 23 IrisUPC-BoldItalic 24 IrisUPC-Italic 25 IrisUPC-Light 26 JasmineUPC-Bold [C]ontinue | [S]etup | [L]ist fonts | [Q]uit | [N]ext queue <C>
In this example, the action keys are defined as follows:
Key |
Action |
---|---|
[C]ontinue |
Display a further font listing |
[S]etup |
Proceed to setup |
[L]ist fonts |
List fonts again |
[Q]uit |
Quit pfsetup |
[N]ext queue |
Proceed to the next queue |
If you choose the s option, the following prompt is displayed:
[A]dd fonts | [R]emove fonts | [L]ist fonts | [Q]uit | [N]ext queue <N>
In response to the prompt, you can enter a to add fonts to or r to delete fonts from the list for a print queue. The fonts that you select will be highlighted with an asterisk (*) at the end of the font names.
Note
The fonts on this list vary according to the language variants that are installed on your system.
To download the fonts selected in setup mode, you can use the pfsetup utility with the -d option.
Font faulting requests from a PostScript printer with the two channel approach, such as a DEClaser 1152, require that the font faulting daemon, ffd, be running on your system. When the ffd daemon receives a font data request, it extracts the required font glyph data from the specified font and sends it to the printer through the secondary channel. The ffd daemon ensures that all fonts in the font faulting server are available to the printer.
If you configure a print queue that makes use of the two channel approach, or if you modify the secondary channel of a print queue, you must restart the font faulting daemon.
To restart the font faulting daemon, you must log in as root and stop the existing font faulting daemon by entering the following command:
% /sbin/init.d/ffserver stop
To start the font faulting daemon, you can enter:
% /sbin/init.d/ffserver
To fully utilize the features of PrintServer 17 such as two-sided printing and multiple pages per side, it is necessary to use the lpspr command provided by the PrintServer Software Version 5.0 or higher for Tru64 UNIX. This command, however, does not provide features such as locales and fonts for printing text files. To facilitate printing files to PrintServer 17, a unified wwlpspr command is provided in the Tru64 UNIX operating system.
The wwlpspr command is a front end program to parse the parameters passed by users and then call different commands such as print filter, lpr, and lpspr with the appropriate command, thus provides a unified interface.
For the detailed information on the wwlpspr, refer to wwlpspr(1).
This section describes how to set up the following printers:
To configure the Thai Epson LQ1050+ dot matrix printer:
lprsetup ep1050+
The following prompt is displayed:
Do you print nonAscii characters on the flag pages? [n]
The following prompt is displayed:
Do you want to print every Thai character in 1.5 lines spacing instead of 3 lines in 3 pass mode? [n]
Enter symbol name:
In response to the prompt:
Enter a new value for symbol 'ya'? ["plocale=th_TH"]
input the new values. Please do not forget the double quote around the parameters, and copy the values found in the previous prompt
To print Thai text files on this printer, use the lpr command.
The thailpof printer filter is generic enough for most dot matrix printers. You can use the preceding procedure to configure another dot matrix printer by defining the appropriate yp value. For advanced tuning, refer to the previous sections on how to define the control sequences and internal codes.
The DEClaser 1152 printer can be used to print Thai characters by using the font faulting mechanism with two communications channels. One channel is for normal data and the second channel is for font faulting data. See Figure 8-1.
Font faulting requires 4M bytes of printer memory. If your DEClaser 1152 printer has only 2M bytes of memory, you must install the LN07X-UF memory board to provide the additional 2M bytes of memory. Refer to the printer manual for installing the LN07X-UF memory board.
You also need to establish one and only one system to be the font-faulting server for the printer. This server sends font information to the printer through a secondary communication interface, or channel. The printer's secondary channel connection to the font-faulting server can be made through either a local port or a Local Area Transport (LAT) port. If the connection is through a LAT port, make sure that no other applications or hosts are using that port.
An 8 pin Din to 6 Pos MMJ Adapter (part number: -H8584-AB) is needed to convert the Apple-talk interface on the printer to be the secondary channel used by the font-faulting mechanism. The baud rate of the secondary interface should match the value of the $BAUD parameter in the /sbin/init.d/ffserver file. By default, this value is 9600.
To configure the DEClaser 1152 printer to print Thai files:
Do you want to configure this machine as font faulting server for the DEClaser 1152 printer? One and only one font faulting server should be configured for every DEClaser 1152 employing font faulting mechanism. [n]Then, enter the full path name of the port used to connect the secondary channel for the ya capability.
Do you want to set up the printer codeset or default font for printing non-Ascii text? If your answer is 'y', please consult printcap.4 for the parameters. *** Remember to enclose the parameters with a pair of double quotes. [n]Then, type the following:
"plocale=th_TH font=<any Thai font>"Refer to Chapter 5 for list of Thai outline fonts.
Enter symbol name:Input the new values in response to the following prompt:
Enter a new value for symbol 'ya'? ["plocale=th_TH font=LilyUPC-Light"]Remember to include the double quotation marks around the parameters, and use the same values you entered at the previous prompt.
% /sbin/init.d/ffserver stop % /sbin/init.d/ffserver startYou need to enter these commands only after adding or modifying the printer queue. The next time the server is rebooted, the font-faulting daemon will locate the printer automatically.
For the details of the font faulting daemon and the pfsetup utility, see Section 8.4, Commands and Daemons.
To print Thai text files to print queues connected to a DEClaser 1152 printer, use the lpr command. You can override the default font setting in the /etc/printcap file by using the -A option to the lpr command.
The DEClaser 5100 printer can be used to print Thai characters using the font-faulting mechanism with built-in hard disk. The model that supports the font-faulting mechanism is the LN90X-HD, which includes the 128 MB hard disk option. The printer also must have at least 6 MB of memory.
To configure the DEClaser 5100 printer to print Thai files:
Do you want to set up the printer codeset or default font for printing non-Ascii text? If your answer is 'y', please consult printcap.4 for the parameters. *** Remember to enclose the parameters with a pair of double quotes [n]Then, type the following:
"plocale=th_TH font=<any Thai font>"Refer to Chapter 5 for list of Thai outline fonts.
Enter symbol name:Input the new values in response to the following prompt:
Enter a new value for symbol 'ya'? ["plocale=th_TH font=LilyUPC-Light"]Remember to include the double quotation marks around the parameters, and to use the same values you entered at the previous prompt.
For the details of the pfsetup utility, see Section 8.4, Commands and Daemons.
To print Thai text files to print queues connected to a DEClaser 5100 printer, use the lpr command. You can override the default font setting in the /etc/printcap file by using the -A option to the lpr command.
The PrintServer 17 printer can be used to print Thai characters by using the font-faulting mechanism through the network. There are no special hardware requirements.
To configure the PrintServer 17 printer to print Thai files:
:ya="plocale=th_TH font=<any Thai font>":\Refer to Chapter 5 for list of Thai outline fonts.
Enter symbol name:Input the new values in response to the following prompt:
Enter a new value for symbol 'ya'? ["plocale=th_TH font=LilyUPC-Light"]Remember to include the double quotation marks around the parameters, and use the same values you entered at the previous prompt.
For the details of the pfsetup utility, see Section 8.4, Commands and Daemons.
To print Thai text files to print queues connected to a PrintServer 17 printer, use the wwlpspr command. You can override the default font setting in the /etc/printcap file by using the -A option to the wwlpspr command.
To configure a PostScript printer to use the wwpsof filter: