[Contents] [Previous Chapter] [Next Section] [Next Chapter] [Index] [Help]


8   Chinese Printing Support

This chapter introduces the Chinese printing support provided by Tru64 UNIX. It describes the supported printers, print file formats, features, and maintenance procedures for supporting Chinese printing.


[Contents] [Previous Chapter] [Next Section] [Next Chapter] [Index] [Help]


8.1   Supported Printers

Tru64 UNIX supports text and PostScript printers.


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.1.1   Text Printers

Tru64 UNIX supports text printers with built-in Chinese fonts.


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.1.2   PostScript Printers

Tru64 UNIX supports Chinese printing on PostScript printers in the following ways:

For the details about the supported printer types and print filters, see Chapter 4.


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.2   Print File Formats

Tru64 UNIX supports printing mixed ASCII and Chinese 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.


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.3   Printing Features

Tru64 UNIX supports the following printing features:


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.3.1   Font Embedding

Font embedding refers to a mechanism where all the necessary font data is embedded within the printer input file. It is not necessary for printers to have resident fonts. This mechanism is supported only on PostScript printers that support PostScript level 2 or level 1 with multibyte font extension. Outline fonts are used for the embedding, if available. Otherwise, lower quality bitmap fonts are used.

The font-embedding mechanism is useful since few printers have Chinese resident fonts. However, there must be enough memory inside the printer to hold the font data or the print job might fail. The amount of memory required depends on the nature of the print job. It is recommended that at least 4 MB or more printer memory be available for the embedding mechanism.

Because of the large amount of data transferred to the printer, it is also necessary to use a high speed link between the host computer and the printer. Using the serial port for printing is too slow for the font-embedding mechanism.

See wwpsof(8) for more information about how to use the font embedding mechanism.


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.3.2   Font Faulting

Font faulting is a mechanism used to handle the large memory required by fonts for some codesets, particularly multibyte codesets for Asian languages. Using font faulting, font information is stored on either:

The font information is loaded into the printer on demand, thus conserving printer memory.

Font faulting is often essential for multibyte ideographic fonts because the memory required to store a single font can exceed the memory capacity of many printers. Specialized local language printers, such as Japanese printers, do not require font faulting because the local language fonts reside on the printer. However, other printers require a mechanism to load these fonts as needed for different parts of the same print job.

The font-faulting mechanism is very useful for a desktop printing environment, in which a large number of different single-byte fonts may be required. In this case, simultaneously storing all the fonts in memory reduces the available memory, and therefore speed, of the printer. Also, it is possible that the number of required fonts is so large that they cannot all be in memory at the same time.

Font faulting for multibyte fonts is done on a per character (or per glyph) basis because these fonts support extremely large numbers of characters. 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 more efficient.

The font-faulting mechanism can be used with the following printers:

See Section 8.5 for information about configuring these printers.


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.3.3   Software On-Demand Font Loading

Software On-Demand Font Loading (SoftODL) is a mechanism through which a terminal or a bitmap printer downloads the relevant bitmap font information for a user-defined character (UDC) at the time the character needs to be displayed or printed. The Chinese bitmap printers that can support this feature include:


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.3.4   Codeset Conversion

Tru64 UNIX includes a codeset conversion mechanism used to print text files that have a different codeset from the one used by the printer. For printers with built-in or downloaded Chinese fonts, the codeset of the printer should be defined to match the codeset of the built-in fonts. For printers using the font-faulting mechanism, the codeset of the printer should be defined to match the codeset of the font to be loaded. For printers using the font-embedding mechanism, the codeset of the printer should not be defined.


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.3.5   Outline Fonts

Tru64 UNIX 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.

There are four sets of Chinese outline fonts, two for traditional Chinese and two for simplified Chinese. These fonts are:

Those fonts with the CNS11643 extension are traditional Chinese fonts encoded in the DEC Hanyu codeset, with glyphs for plane 1 and plane 2 characters. Those fonts with the GB2312-80 extension are simplified Chinese fonts encoded in DEC Hanzi.


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.4   Printing Commands and Daemons

Before you can utilize the printing features supported by Tru64 UNIX, there are some commands and daemons that you should be understand. The following sections discuss these commands and daemons and illustrate how they are used for configuration.


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.4.1   Country-Specific Options to the lpr command

In addition to the usual options to the lpr command, the -A option is used to pass country-specific parameters. You can use ya to set the parameters to the -A option in the /etc/printcap file. For example, you can specify the parameters using the -A option to the lpr command as:

% lpr -A "flocale=zh_TW.big5 font=Sung-Light-
CNS11643 plocale=zh_TW.dechanyu" <file>

You an define the same set of parameters, in the /etc/printcap file as:

:ya="flocale=zh_TW.big5 font=Sung-Light-
CNS11643 plocale=zh_TW.dechanyu":\

The parameters supplied with the -A option to the lpr command override the corresponding default values in the /etc/printcap file.

The following parameters are applicable to Chinese 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 is interpreted using the current locale. In Chinese printing, this value is particularly important in order for the lpr command to correctly interpret the characters. Moreover, if the plocale option is also set, the lpr command performs codeset conversion for the source text file.

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 employs the font faulting mechanism, the plocale value should match the font used to print the text file.

Specifies the font name for printing the source text files on a PostScript printer. This parameter is used for printing text files only, as PostScript files are already tagged with the required font name.

Specifies the path of the SoftODL database files. This parameter is used to override the system default SoftODL database path, thus allowing users to access their own SoftODL database.

Specifies what SoftODL font style and size to use. The value is of the form <style>-<NxN> (that is, normal-24x24). If not specified, the system default SoftODL style and size are used.

Specifies the number of lines per page. You can use this parameter with the -w command to control the font size and orientation of the output.


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.4.2   PostScript Font Management Utility (pfsetup)

A PostScript font management utility, pfsetup, is provided to help you set up print queues to use the font-faulting mechanism. This utility has the following syntax:

pfsetup [-s] [-d] [queue_name...]

The following options can be used:
-s

setup mode - Allows you to set up lists of fonts to be downloaded

-d

download mode - Downloads fonts to printers according to the lists prepared with the -s option

If you do not specify an option, the pfsetup command displays the information about the print queues that have been set up with this utility. If you do not specify a particular queue name, the pfsetup command processes every applicable queue.

In setup mode, the pfsetup command 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:


% /usr/sbin/pfsetup -s

========================================================

Printer queue: lp1 | 1 | dl1152w

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 XiSong-GB2312-80 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>

The action keys provided by pfsetup have the following meaning:

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, another 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 the list for a print queue or "r" to delete fonts from the list for a print queue. The fonts you select are highlighted with an asterisk (*).

Note

The fonts on this list vary according to the language variants that are installed on your system.

To download the fonts or font headers selected in setup mode, use the pfsetup command with the -d option.

For fonts of ideographic character sets, the pfsetup utility downloads only their font headers. Data defining their font glyphs is downloaded only on an as-needed basis through the font faulting mechanism. This saves printer memory. For single-byte fonts, the utility downloads the entire font onto printers for efficiency.


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.4.3   Font-Faulting Daemon (ffd)

To handle font-faulting requests from a PostScript printer with the two channel approach, (such as the DEClaser 1152, see Section 8.5.2), the font faulting-daemon, ffd, must be running on your system. When the 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.

If you configure a print queue that uses the two channel approach, or modify the secondary channel of a print queue, you must restart the font-faulting daemon.

To restart the font-faulting daemon, log in as a superuser and stop the existing font-faulting daemon with the following command:

% /sbin/init.d/ffserver stop

To start the font-faulting daemon, you can enter:

% /sbin/init.d/ffserver


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.4.4   PrintServer Printing Command (wwlpspr)

To fully utilize the features of PrintServer 17, such as two-sided printing, multiple pages per side, and so on, it is necessary to use the lpspr command provided by PrintServer Software Version 5.0 or later for Tru64 UNIX. This command, however, does not provide the features like locales and fonts for printing text files. To support printing files to PrintServer 17, the Tru64 UNIX software provides a unified wwlpspr command.

The wwlpspr command is a front-end program that parses the parameters passed by users and calls different commands such as print filter, lpr, or lpspr with the appropriate command. This provides users with a unified interface.

For details on the wwlpspr command, see wwlpspr(1).


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.5   Chinese Printer Setup

This section describes how to set up the following printers to print Chinese characters:


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.5.1  Dot Matrix Printers

The only consideration in configuring the CP382-D, LA88-C, and LA380-CB printers is whether ODL printing should be enabled or not, and, if enabled, the default ODL database path and style.

To configure any of the Chinese dot matrix printers:

  1. Add a printer using the lprsetup command and specify cp382d, la88c, or la380cb printer.

    The following prompt is displayed:

    Do you want to enable ODL? [n]


  2. Answer y if you want ODL printing, and n if you do not.

    If you answer y, the default ODL database and style will be used and the following prompt is displayed:

    Enter symbol name:
  3. To change the default, enter ya at the prompt. The following prompt is displayed:

    Enter a new value for symbol 'ya'? ["plocale=zh_TW.dechanyu"]

  4. Enter the following string at the prompt, using the pathname and style of your ODL:

    "plocale=zh_TW.dechanyu odldb=<path to the default ODL db> odlstyle=<default ODL style>"

    Remember the double quotation marks around the parameters, and replace the plocale with the value found in the previous prompt.

You can now use the lpr command to send Chinese text files to print queues connected to these dot matrix printers. You can either set the LANG environment variable or use the -A option to denote the codeset of the text files. For example, the following command prints the file encoded in the Taiwanese EUC codeset:

% lpr -A "flocale=zh_TW.eucTW" my.file1

You can override the default ODL path by including the odldb and odlstyle options to the -A option of the lpr command. For example, the following command uses the ODL database in the /usr/priv/odl directory:

% lpr -A "odldb=/usr/priv odlstyle=normal-24x24" my.file2


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.5.2   DEClaser 1152

The DEClaser 1152 printer can be used to print Chinese 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, as shown in Figure 8-1.

Figure 8-1: Two-Channel Communication of the Font-Faulting Mechanism

Two-Channel Communication of the Font Faulting Mechanism

Font faulting requires 4MB of printer memory. If your DEClaser 1152 printer has only 2MB of memory, you must install the LN07X-UF memory board to provide the additional 2MB of memory. See the printer manual for information about installing the LN07X-UF memory board.

You also must 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 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 is needed to convert the Apple-talk interface on the printer to be the secondary channel that the font-faulting mechanism uses. The baud rate of the secondary interface should match the value of the $BAUD variable in the /sbin/init.d/ffserver file. By default, this value is 9600 baud.

To configure the DEClaser 1152 to print Chinese files:

  1. Add a printer using the lprsetup command and select the dl1152w printer type.

    The following prompt is displayed:

    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]
  2. If this machine is the font-faulting server for the printer, answer y to the prompt, and then enter the full pathname of the port used to connect the secondary channel for the ya capability.

    The following prompt is displayed:

    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]

  3. Answer y to the prompt, and then define plocale and font in one of the following ways:

    "plocale=<Chinese locale> font=<font>"

    - Define plocale as zh_TW.dechanyu if you are printing traditional Chinese characters, and define font as either Sung-Light-CNS11643 or Hei-Light-CNS11643.

    - Define plocale as zh_CN.dechanzi if you are printing simplified Chinese characters, and define font as either XiSong-GB2312-80 or Hei-GB2312-80.
  4. Use the pfsetup command to download the fonts. For greatest efficiency, download all the Chinese fonts unless there are some you will never use, plus the most frequently used single-byte fonts. The printer can access the fonts that are not manually downloaded, but there is overhead for dynamically downloading fonts.
  5. If you configured this machine as the font-faulting host, enter the following commands to notify the font-faulting daemon about the new printer:

    % /sbin/init.d/ffserver stop
    % /sbin/init.d/ffserver start


    You need to enter these commands only after you add or modify the printer queue. The next time you reboot the server, the font-faulting daemon will automatically locate the printer.

  6. Each time the font-faulting server or the DEClaser 1152 is restarted, you should use the pfsetup command to download the fonts again.

For details about the font-faulting daemon and the pfsetup utility, see Section 8.4.

To send Chinese text files to print queues connected to a DEClaser 1152, use the lpr command. You can either set the LANG environment variable or use the -A option to denote the codeset of the text files. For example, the following command prints the file encoded in the Taiwanese EUC codeset:

% lpr -A "flocale=zh_TW.eucTW" my.file1

You can override the default plocale and font setting in the /etc/printcap file using the -A option of the lpr command, but be sure the font you use matches the codeset of the plocale. For example, the following command gets the file encoded in Taiwanese EUC, converts it to DEC Hanzi, and prints it using the XiSong-GB2312-80 font:

% lpr -A "flocale=zh_TW.eucTW
plocale=zh_CN.dechanzi font=XiSong-GB2312-80" my.file2


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.5.3   DEClaser 5100

The DEClaser 5100 printer can be used to print Chinese characters by using the font-faulting mechanism with built-in hard disk. The LN90X-HD model that supports the font-faulting mechanism, also includes the 128 MB hard disk option. The printer must have at least 6 MB of memory.

To configure the DEClaser 5100 to print Chinese files:

  1. Add a printer using the lprsetup command and select the dl5100w printer type.

    The following prompt is displayed:

    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]

  2. Answer y to the prompt and define the plocale and font in one of the following ways:

    "plocale=<Chinese locale> font=<font>"

    - Define plocale as zh_TW.dechanyu if you are printing traditional Chinese characters, and define font as either Sung-Light-CNS11643 or Hei-Light-CNS11643.

    - Define plocale as zh_CN.dechanzi if you are printing simplified Chinese characters, and define font as either XiSong-GB2312-80 or Hei-GB2312-80.
  3. Use the pfsetup command to download the fonts. For greatest efficiency, download all fonts that you expect the printer to need; any fonts not manually downloaded are not accessible to the printer.

    You need to download fonts only once. The fonts remain on the printer until they are manually removed or the hard disk is reformatted.

For details about the pfsetup utility, see Section 8.4.

To send Chinese text files to print queues connected to a DEClaser 5100, use the lpr command. You can either set the LANG environment variable or use the -A option to denote the codeset of the text files. For example, the following command prints the file encoded in the Taiwanese EUC codeset:

% lpr -A "flocale=zh_TW.eucTW" my.file1

You can override the default plocale and font setting in the /etc/printcap file by using the -A option to the lpr command, but be sure the font you use matches the codeset of the plocale. For example, the following command gets the file encoded in Taiwanese EUC, converts it to DEC Hanzi, and prints it using the XiSong-GB2312-80 font:

% lpr -A "flocale=zh_TW.eucTW
plocale=zh_CN.dechanzi font=XiSong-GB2312-80"
my.file2


[Contents] [Previous Chapter] [Previous Section] [Next Section] [Next Chapter] [Index] [Help]


8.5.4   PrintServer 17

The PrintServer 17 printer can be used to print Chinese characters by using the font-faulting mechanism through the network. There are no special hardware requirements.

To configure the PrintServer 17 to print Chinese files:

  1. Install the PrintServer Software Version 5.0 or later for Tru64 UNIX. This is a layered product, purchased separately. See the installation guide for information about installing and configuring the PrintServer software.
  2. If you want to define the default printer codeset or default font to print Chinese text, use the lprsetup command or manually update the /etc/printcap file to include the ya option. Add the following string to the file:

    :ya="plocale=<Chinese locale> font=<font>":\

    - Define plocale as zh_TW.dechanyu if you are printing traditional Chinese characters, and define font as either Sung-Light-CNS11643 or Hei-Light-CNS11643.

    - Define plocale as zh_CN.dechanzi if you are printing simplified Chinese characters, and define font as either XiSong-GB2312-80 or Hei-GB2312-80.
  3. Use the pfsetup command to define the fonts to be downloaded. For greatest efficiency, download all Chinese fonts unless there are some you will never use, plus the most frequently used single-byte fonts. The printer can access the fonts that are not manually downloaded, but there is overhead for dynamically downloading fonts.

    Note that you should execute the pfsetup command in the Configuration Host of the PrintServer Printer. After executing pfsetup, restart the Management Client to initialize the new configuration. See the PrintServer Software documentation for further details.
  4. Turn off the PrintServer 17 and then turn it on. The fonts defined in step 3 will be downloaded automatically.

    Hereafter, each time you restart the PrintServer 17, the fonts will be downloaded automatically. Thus, the pfsetup command is executed only once as long as you do not modify the configuration.

For details about the pfsetup utility, see Section 8.4.

To send Chinese text files to print queues connected to a PrintServer 17, use the wwlpspr command. You can either set the LANG environment variable or use the -A option to denote the codeset of the text files. For example, the following command prints the file encoded in the Taiwanese EUC codeset:

% wwlpspr -A "flocale=zh_TW.eucTW" my.file1

You can override the default plocale and font setting in the /etc/printcap file by using the -A option to the wwlpspr command, but be sure the font you use matches the codeset of the plocale. For example, the following command gets the file encoded in Taiwanese EUC, converts it to DEC Hanzi, and prints it using the XiSong-GB2312-80 font:

% wwlpspr -A "flocale=zh_TW.eucTW
plocale=zh_CN.dechanzi font=XiSong-GB2312-80" my.file2


[Contents] [Previous Chapter] [Previous Section] [Next Chapter] [Index] [Help]


8.5.5   Generic PostScript Printers

Any PostScript printers that support PostScript level 2 or level 1 with multibyte font extension and sufficient printer memory can be used to print Chinese using the font-embedding mechanism.

To configure a printer to use font embedding, use the lprsetup or printconfig utility to set up a print queue using the wwpsof filter. You do not need to specify the printer locale as this mechanism can print any language as long as the fonts are available in the system. See wwpsof(8) for information on how to use the features available for this print filter.


[Contents] [Previous Chapter] [Next Chapter] [Index] [Help]