Managing Character Sets, Filters, Forms, and Fonts (Tasks)
This chapter provides background information and step-by-step instructions for setting up and administering character sets, print filters, forms, and fonts.
This is a list of the step-by-step instructions in this chapter.
For overview information about printing, see Chapter 2, Managing Printing Services (Overview).
Managing Character Sets
Printers differ in the method they use to print text in various font styles. For example, PostScript printers treat text as graphics. These printers can generate text in different fonts, and place the text in any position, size, or orientation on the page. Other types of printers support a more limited number of font styles and sizes, using either print wheels, font cartridges, or preprogrammed selectable character sets. Usually, only one of these printing methods applies to a given printer type.
Print wheels and font cartridges, from the perspective of the LP print service, are similar, because someone must intervene and mount the hardware on the printer, when needed. Character sets that require you to physically mount a wheel or cartridge are referred to as hardware character sets. Character sets that do not require hardware mounting, that come preprogrammed with the printer, and can be selected by a print request, are referred to as software character sets.
When you set up a non-PostScript printer, you need to tell the LP print service which print wheels or selectable character sets are available to users. When users submit print requests, the lp -S command enables them to specify a print wheel or selectable character set to use for the print job. Users do not have to know which type of character set applies. They just refer to the font style by the name you have defined. For example, you can define a print wheel as gothic. To request the gothic print wheel, the user would use the following command:
% lp -S gothic filename |
Selectable Character Sets
The selectable character sets supported by a printer are listed in the terminfo entry for that printer. For example, the entry for the ln03 printer is /usr/share/lib/terminfo/l/ln03. You can find the names of selectable character sets for any printer type in the terminfo database by using the tput command. The syntax for the tput command is:
tput -T printer-type csn |
The csn option is an abbreviation for character set number. The number starts with 0, which is always the default character set number after the printer is initialized. You can repeat the command, using -1, -2, -3, and so on in place of the -0, to display the names of the other character sets. For each selectable character set, a terminfo name (for example, usascii, english, finnish, and so forth) is returned.
In general, the terminfo character set names should closely match the character set names used in the manufacturer's documentation for the printer. Because manufacturers do not all use the same character set names, the terminfo character set names can differ from one printer type to the next.
You do not have to register the selectable character set names with the LP print service. However, you can give them more meaningful names or aliases.
Note - If you do not specify the selectable character sets that can be used with a printer, the LP print service assumes that the printer can accept any character set name (such as cs0, cs1, or cs2) or the terminfo name known for the printer.
Users can use the lpstat -p -l command to display the names of the selectable character sets that you have defined for each printer on a print server.
Note - Character sets for PostScript printers are not listed when you use the lpstat -p -l command because the PostScript fonts are controlled by PostScript filters, not by entries in the terminfo database. For information about how to administer PostScript fonts, see "Managing Fonts".
Hardware-Mounted Character Sets
Another method to obtain alternative character sets is to use removable print wheels or font cartridges that you physically attach, or mount, in a printer.
To administer hardware-mounted character sets, you inform the LP print service of the names you want to use for the available print wheels, and how you want to be alerted when a printer needs a different print wheel. Then, when a user requests a particular character set with the lp -S command, the scheduler sends an alert to mount the print wheel, and the print request is placed in the print queue. When you mount the correct print wheel and tell the LP print service that the print wheel is mounted, the job is printed. For more information, see "How to Unmount and Mount a Print Wheel or Font Cartridge".
If you do not specify multiple print wheels or cartridges for a printer, the LP print service assumes that the printer has a single, fixed print wheel or cartridge, and users cannot specify a special print wheel or cartridge when using the printer.
Unlike selectable character sets, the names you use for print wheels or cartridges are not tied to entries in the terminfo database. Print wheel or cartridge names are used only for the purpose of communicating with the LP print service and its users.
The names you choose for print wheels or cartridges, however, should have meaning to the users. The names should refer to font styles. In addition, the names should be the same across printers that have similar print wheels or cartridges, or selectable character sets. That way, users can ask for a font style (character set) without regard to which printer--or even whether a print wheel or cartridges--or selectable character set will be used.
Of course, you and the printer users should agree on the meanings of print wheel or cartridge names. Otherwise, what a user asks for and what you mount, might not be the same character set.
Tracking Print Wheels
The procedure for tracking print wheels is similar to the procedure for tracking forms. Some printers (usually letter-quality printers) have removable print heads, such as print wheels or print cartridges, that provide a particular font or character set. A user can request a named character set. If that character set is not available, the LP print service notifies root of the request. The job is stored in the print queue until the print wheel is changed.
Alerts for Mounting Print Wheels or Cartridges
You request alerts for mounting print wheels or cartridges in the same way you request other alerts from the LP print service. For general information about alerts, see "Setting Up Printer Fault Alerts".
How to Define a Print Wheel or Font Cartridge
Log in as superuser, lp, or assume an equivalent role on the print server.
Define a print wheel or font cartridge that can be used with the printer.
print-server# lpadmin -p printer-name -S hard-charset1[,hard-charset2...]
-p printer-name
Name of the printer for which you are defining a print wheel or font cartridge.
-s hard-charset
Hardware character set name of the print wheel or font cartridge.
You can specify multiple hardware character sets with this command. Use commas or spaces to separate character set names. If you use spaces, enclose the list of character set names in quotes.
Define names that are meaningful to users, and inform the users of the names.
The print wheel or font cartridge definition is added in the print server's /etc/lp/printers/printer-name/configuration file.
Log in as superuser, lp, or assume an equivalent role on a print client of the print server.
Define the same print wheel or font cartridge for the print client.
print-client# lpadmin -p printer-name -S hard-charset1[,hard-charset2...]
In this command, the variables are the same as those in Step 2.
The print wheel or font cartridge definition is added in the print client's /etc/lp/printers/printer-name/configuration file.
Repeat Step 3 and Step 4 for each print client that might need to use the print wheel or font cartridge.
Verify that the information following the Character sets heading in the following output is correct on both the print server and the print client.
$ lpstat -p printer-name -l