Troubleshooting
Problem
This document provides information about the HP PCL5 font control strings by laser printers that support the HP PCL5, HP PCL5e, HP PCL5c, or HP PCL6 printer languages.
Resolving The Problem
This document provides information about the HP PCL5 font control strings by laser printers which support the HP PCL5, HP PCL5e, HP PCL5c or HP PCL6 printer languages (for example, HP LaserJet 4, 5, 6, 4000 and 8000 printers, IBM Infoprint 1000 series printers, Lexmark Optra printers, and others). This information is intended to be used when creating a modified Workstation Customizing Object (WSCST) to get Host Print Transform (HPT) to print in a different font.
This document assumes you understand the workstation customizing procedure. These are the changes to the retrieved source of the system host print transform manufacturer type and model *WSCST object. For more information on modifying a Workstation Customizing Object object, refer to the following Rochester Support Center knowledgebase document:
N1010140: Instructions for Modifying a Workstation Customizing Object (WSCST)
Notes:
1. | The point size controls do not have an effect on the fixed pitch fonts. |
2. | The primary pitch controls do not have an effect on non-fixed pitch (or typographic) fonts. |
3. | The LinePrinter font is a special fixed pitch font that requires both the primary pitch and the point size to be specified and requires a Symbol Set command to be sent prior to the font command. Also, the LinePrinter font only supports 16.67 pitch and 8.5 point, so it always contains X'31362E363768382E3576'. However, the LinePrinter 16.67 font can be spaced out to other Characters Per Inch (CPI) values using the Horizontal Motion Index (HMI) command. For more information, refer to the following section entitled PCL5 Font String for a LinePrinter 16.67 CPI Font to be Printed at 13.3 CPI. |
4. | Not all combinations of font control strings give anticipated results. It is best to print out the PCL resident font listing on the printer. This gives the supported control strings for that printer. Select the typeface family and note the variable area in the font listing. Areas of most flexibility are the primary pitch variations for fixed pitch fonts or point size for variable spacing fonts. |
5. | It might be necessary to include Primary symbol set controls preceding the font string. For example, the HP printers use the ISO6:ASCII symbol set for most fonts. Print out the PCL font listing on the printer. If you see the <esc>(0U preceding the string, this is the symbol set. The <esc> translates to X'1B', the '(' translates to X'28', the '0' translates to X'30', and the 'U' translates to X'55'. Therefore, <esc>(0U translates to X'1B283055'. |
This document was last updated on 4 April 2014.
Explanation of Fixed Pitch Fonts
A fixed pitch font is one where all of the characters have the same width. Many printers, including dot matrix and line printers, will support printing fonts at particular pitches or Characters Per Inch (CPI) values, such as 10 CPI, 12, CPI, 15 CPI, 16.67 CPI, 17.1 CPI, or 20 CPI. However, most HP PCL5 compatible laser printers support scalable fonts that can be scaled to fit whatever pitch is specified.
For example, an HP LaserJet printer has a maximum print line of 8.0 inches in portrait, so only 80 characters will fit at 10 CPI. If you need to print an 85 character spooled file in portrait on an HP LaserJet printer you could specify to print a scalable Courier font at 10.63 CPI, which would be slightly smaller than printing at 10 CPI. That would be able to print all 85 characters because 85 divided by 8 = 10.625, which rounds up to 10.63.
Notes Concerning Fixed Pitch Fonts:
o | When using fixed pitch fonts, every character has the same width. For example, 10 pitch or 10 CPI means that 10 characters will fit within an inch. Therefore, each character is 1/10 of an inch wide. |
o | The space character is same width as every other character, so there is no problem using spaces to position columns of data. |
o | When selecting a fixed pitch font using an HP PCL5 font string, the printer hardware must have the selected font or typeface built-in and it must support either scalable fonts or the specific pitch or Characters Per Inch (CPI) that is being specified. If not, the PCL5 font string specified can produce unpredictable results. |
o | Printers that use the HP PCL3 or HP PCL3 GUI printer languages, such as certain HP DeskJet or HP OfficeJet printer models, may only support 10 CPI, 12 CPI and 16.67 CPI fonts. |
Explanation of Non-Fixed Pitch (or Typographic) Fonts
A non-fixed pitch, or typographic, font is one where each of the characters have their own width. For instance, a lower-case "i" is much narrower in a typographic font than an uppercase "W". In fixed pitch fonts, all characters have the same width, including the letters "i" and "W." Fixed pitch fonts are specified using the pitch or Characters Per Inch (CPI) value which indicates the font width. The characters are not all the same width in Typographic fonts, so they are specified using the point size, which indicates the font height.
Notes Concerning Typographic Fonts:
1. | When using non-fixed pitch (typographic) fonts, the character widths vary depending on the character. For example, a lower-case "i" is a very narrow character and an uppercase "W" is a very wide character. The space character is typically a very narrow character as well, so using it to position columns of data can cause alignment problems. |
2. | Non-fixed pitch (typographic) fonts use an implied CPI value, based on the width of the space character, to align fields when using DDS. Using non-fixed pitch (typographic) fonts with columns of fields can also cause alignment problems. |
3. | Because non-fixed pitch (typographic) fonts have characters of variable widths, care should be taken with the use of underlining and overstriking. Highlighting or underlining text by printing a line with the Space After (SPACEA) value of 0 and then printing another line containing underline characters or "repeated" text might not work correctly. The HIGHLIGHT and UNDERLINE DDS Keywords are recommended when using typographic fonts. |
4. | When selecting a non-fixed pitch or typographic font using an HP PCL5 font string, the printer hardware must have the selected font or typeface built-in and it must support full scalability of the font point size being specified. If not, the PCL5 font string specified can produce unpredictable results. |
-
HP PCL5 Font Strings for Fixed Pitch Fonts
Category Description Control (hex) ASCII (dec) Prefix Prefix to setting font 1B2873 <esc>(s Spacing Variations Fixed spacing 3070 0p Primary Pitch Variations 10.0 CPI 31302E3068 10.0h 12.0 CPI 31322E3068 12.0h 13.3 CPI 31332E3368 13.3h 15.0 CPI 31352E3068 15.0h 16.0 CPI 31362E3068 16.0h 16.67 CPI 31362E363768 16.67h 17.1 CPI 31372E3168 17.1h 20.0 CPI 32302E3068 20.0h Primary Style Variations Solid Upright 3073 0s Italic 3173 1s Condensed 3473 4s Condensed Italic 3573 5s Compressed, or Extra Condensed 3873 8s Expanded 323473 24s Outline 333273 32s Inline 363473 64s Shadowed 31323873 128s Outline Shadowed 31363073 160s Stroke Weight Variations Ultra Thin 2D3762 -7b Extra Thin 2D3662 -6b Thin 2D3562 -5b Extra Light 2D3462 -4b Light 2D3362 -3b Demi Light 2D3262 -2b Semi Light 2D3162 -1b Medium, Book 3062 0b Semi Bold 3162 1b Demi Bold 3262 2b Bold 3362 3b Extra Bold 3462 4b Black 3562 5b Extra Black 3662 6b Ultra Black 3762 7b Typeface Family Variations LinePrinter 3054 0T Courier 3430393954 4099T CourierPS 323435373954 24579T Letter Gothic 3431303254 4102T Prestige 3431303154 4101T
Example for a Courier 13.3 CPI Font
1 Start with the prefix for a PCL font control (X'1B2873') and the Spacing Variation of Fixed spacing (X'3070'), which results in:
DATA ='1B28733070'X.2 Convert the desired Characters Per Inch (CPI) value (13.3) to the ASCII equivalent, in hexadecimal. Each digit can be converted to ASCII by adding X'30', and an ASCII period (".") is X'2E', so the ASCII equivalent of "13.3" is X'31332E33'. Appending this to the DATA string, along with an ASCII "h" (X'68'), results in:
DATA ='1B2873307031332E3368'X.3 Append the Primary Style Variation of Solid Upright (X'3073') to the end of the DATA string, which results in:
DATA ='1B2873307031332E33683073'X.4 Append the Stroke Weight Variation of Medium (X'3062') to the end of the DATA string, which results in:
DATA ='1B2873307031332E336830733062'X.
Note: To print in a darker font, try appending the Stroke Weight Variation of Semi Bold (X'3162') before trying Bold (X'3362'). Otherwise, there will be no distinction between normal and bolded (emphasized) text.5 Lastly, append the Typeface Family Variation of Courier (X'3430393954') to the end of the DATA string. The final result is:
DATA ='1B2873307031332E3368307330623430393954'X.
PCL5 Font String for a Letter Gothic 13.3 CPI Font
If the same steps are followed, but then append the Typeface Family Variation of Letter Gothic (X'3431303254') to the end of the DATA string instead, the final result is:
DATA ='1B2873307031332E3368307330623431303254'X.
PCL5 Font String for a LinePrinter 16.67 CPI Font to be Printed at 13.3 CPI
When selecting the LinePrinter font, the Symbol Set must first be selected using the Symbol Set PCL command, such as 1B28313255, which selects the PC-850 symbol set. Also, the LinePrinter font can only print at 16.67 CPI, however a Horizontal Motion Index (HMI) command can be added to have the printer space out the font out to 9 decipoints (9/120 of an inch) or 13.3 CPI, even though each character will be the same size as when printing at a true 16.67 CPI. The combination of the Symbol Set command, Font command, and Horizontal Motion Index (HMI) command is:
DATA ='1B28313255'X
'1B2873307031362E363668382E3576307330623054'X
'1B266B3948'X.
Note: The Horizontal Motion Index (HMI) command specifies the width of the columns in 1/120 of an inch. The above control specifies an HMI value of 9 (9/120 = 1/13.3 inch per character, or 13.3 characters per inch). For 15 CPI, specify an HMI value of 8 (8/120 = 1/15 inch per character, or 15 characters per inch), for example:
DATA ='1B28313255'X
'1B2873307031362E363668382E3576307330623054'X
'1B266B3848'X.
For 20 CPI, specify an HMI value of 6 (6/120 = 1/20 inch per character, or 20 characters per inch), for example:
DATA ='1B28313255'X
'1B2873307031362E363668382E3576307330623054'X
'1B266B3648'X.
-
HP PCL5 Font Strings for Non-Fixed Pitch (or Typographic) Fonts
Category Description Control (hex) ASCII (dec) Prefix Prefix to setting font 1B2873 <esc>(s Spacing Variations Variable spacing 3170 1p Point Size Variations 6 point 3676 6v 8 point 3876 8v 9 point 3976 9v 10 point 313076 10v 12 point 313276 12v Primary Style Variations Solid Upright 3073 0s Italic 3173 1s Condensed 3473 4s Condensed Italic 3573 5s Compressed, or Extra Condensed 3873 8s Expanded 323473 24s Outline 333273 32s Inline 363473 64s Shadowed 31323873 128s Outline Shadowed 31363073 160s Stroke Weight Variations Ultra Thin 2D3762 -7b Extra Thin 2D3662 -6b Thin 2D3562 -5b Extra Light 2D3462 -4b Light 2D3362 -3b Demi Light 2D3262 -2b Semi Light 2D3162 -1b Medium, Book 3062 0b Semi Bold 3162 1b Demi Bold 3262 2b Bold 3362 3b Extra Bold 3462 4b Black 3562 5b Extra Black 3662 6b Ultra Black 3762 7b Typeface Family Variations CG Times 3431303154 4101T Univers 3431343854 4148T Antique Olive 3431363854 4168T Garamond 3431393754 4197T Albertus 3433363254 4362T Arial 313636303254 16602T Times New Roman 313639303154 16901T Helvetica 323435383054 24580T
-
List of Default Font IDs Based on Font Range (sorted by Font Range)
] The Font Group Entry (FNTGRPE) tag requires specifying a minimum font ID (MINFID) and maximum font ID (MAXFID) parameters. These parameters are used to specify the font range that will be affected by the FNTGRPE tag. The following is a list of the default font IDs, based on the font range. This is taken from the following document: N1010119: List of Default Font IDs Based on Font Range
Font Range Font Pitch* Default Font ID Font Name 1 - 65 10 11 Courier 10 66 - 153 12 87 Courier 12 154 - 200 PSM* 160 Essay 201 - 210 13.3 204 Matrix Gothic 13.3 211 - 239 15 222 Gothic 15 240 - 246 5 245 Courier 247 - 257 16.7 252 Courier 17 258 - 259 18 252 Courier 17 274 - 279 16.7 252 Courier 17 280 - 284 20 281 Gothic Text 20 300 - 400 16.7 400 Courier 17 1. The font pitch is also referred to as the Characters per Inch or CPI. 2. The term PSM refers to Proportionally Spaced Mode fonts. For proportionally spaced fonts, characters vary in width depending on the character being printed (for example, i is a narrow character, and W is a wide character). The font is based on 12 Characters Per Inch (CPI) or 5/60ths of an inch. More specifically, each character can be one of 5 different widths: 3/60, 4/60, 5/60, 6/60, or 7/60 of an inch. An i is 3/60 of an inch wide, a space is 5/60 of an inch wide, and a W is 7/60 of an inch wide.
-
Default Font Strings Sent by Host Print Transform (HPT)
] The section contains lists of the default font strings used by Host Print Transform (HPT) when using older Manufacturer type and model (MFRTYPMDL) settings that contain CPICOR tags and newer MFRTYPMDL settings where HPT performs its own "best fit" font selection. Each list contains the font string used for 10, 12, 15, 16.7, 18, and 20 Characters Per Inch (CPI) without Computer Output Reduction (COR) processing, as well as 10, 12, and 15 CPI with COR processing. Default Font Strings for Older MFRTYPMDL Settings The default font strings sent by Host Print Transform (HPT) when using older MFRTYPMDL settings that contain CPICOR tags -- such as *HP4, *HP5, *HP5SI, *HP4000, *HP8000 and *HPCOLORLJ:
SPLF Attributes CPI Font String (in ASCII) Font String (in Hexadecimal) 10 CPI 10.00 (s0p10.00h012v0s0b003T 1B2873307031302E303068303132763073306230303354 12 CPI 12.00 (s0p12.00h010v0s0b000T 1B2873307031322E303068303130763073306230303054 13.3 CPI 13.30 (s0p13.30h009v0s0b005T 1B2873307031332E333068303039763073306230303554 15 CPI 15.00 (s0p15.00h008v0s0b000T 1B2873307031352E303068303038763073306230303054 16.7 CPI 16.70 (s0p16.60h008v0s0b006T 1B2873307031362E363068303038763073306230303654 18 CPI 17.10 (s0p17.10h007v0s0b003T 1B2873307031372E313068303037763073306230303354 20 CPI 20.00 (s0p20.00h006v0s0b005T 1B2873307032302E303068303036763073306230303554 10 CPI with COR 17.10 (s0p17.10h007v0s0b000T 1B2873307031372E313068303037763073306230303054 12 CPI with COR 17.10 (s0p17.10h007v0s0b000T 1B2873307031372E313068303037763073306230303054 15 CPI with COR 20.00 (s0p20.00h006v0s0b005T 1B2873307032302E303068303036763073306230303554 SPLF Attributes CPI Font String (in ASCII) Font String (in Hexadecimal) 10 CPI 10.00 (s0p10.00h012v0s0b003T 1B2873307031302E303068303132763073306230303354 12 CPI 12.00 (s0p12.00h010v0s0b000T 1B2873307031322E303068303130763073306230303054 13.3 CPI 13.30 (s0p13.30h009v0s0b005T 1B2873307031332E333068303039763073306230303554 15 CPI 15.00 (s0p15.00h008v0s0b000T 1B2873307031352E303068303038763073306230303054 16.7 CPI 16.70 (s0p16.60h008v0s0b006T 1B2873307031362E363068303038763073306230303654 18 CPI 17.10 (s0p17.10h007v0s0b003T 1B2873307031372E313068303037763073306230303354 20 CPI 20.00 (s0p20.00h006v0s0b005T 1B2873307032302E303068303036763073306230303554 10 CPI with COR 13.30 (s0p13.30h009v0s0b005T 1B2873307031332E333068303039763073306230303554 12 CPI with COR 16.60 (s0p16.60h008v0s0b006T 1B2873307031362E363068303038763073306230303654 15 CPI with COR 20.00 (s0p20.00h006v0s0b005T 1B2873307032302E303068303036763073306230303554
[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"6.1.0"}]Historical Number
8693040
-
List of Default Font IDs Based on Font Range (sorted by Font Range)
Was this topic helpful?
Document Information
Modified date:
18 December 2019
UID
nas8N1010138