Sei sulla pagina 1di 7

Breakdown of HP PCL5 Font Strings Document Description 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 Ro chester Support Center knowledgebase document: 8692422, 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 08/27/2009.

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, 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 pr inting 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: 1 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. 2 The space character is same width as every other character, so there is no problem using spaces to position columns of data. 3 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, t he PCL5 font string specified can produce unpredictable results.

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 HP PCL5 Font Strings for Fixed Pitch Fonts Category Prefix Spacing Variations Primary Pitch Variations Description Prefix to setting font Fixed spacing 10.0 CPI 12.0 CPI 13.3 CPI 15.0 CPI 16.0 CPI 17.1 CPI 20.0 CPI Primary Style Variations Solid Upright Italic Condensed Condensed Italic Compressed, or Extra Condensed Expanded Outline Inline Shadowed Outline Shadowed Stroke Weight Variations Ultra Thin Extra Thin Thin Control (hex) 1B2873 3070 31302E3068 31322E3068 31332E3368 31352E3068 31362E3068 31372E3168 32302E3068 3073 3173 3473 3573 3873 323473 333273 363473 31323873 31363073 2D3762 2D3662 2D3562 ASCII (dec) <esc>(s 0p 10.0h 12.0h 13.3h 15.0h 16.0h 17.1h 20.0h 0s 1s 4s 5s 8s 24s 32s 64s 128s 160s -7b -6b -5b

Extra Light Light Demi Light Semi Light Medium, Book Semi Bold Demi Bold Bold Extra Bold Black Extra Black Ultra Black Typeface Family Variations LinePrinter Courier CourierPS Letter Gothic Prestige Example for a Courier 13.3 CPI Font 1

2D3462 2D3362 2D3262 2D3162 3062 3162 3262 3362 3462 3562 3662 3762 3054 3430393954 323435373954 3431303254 3431303154

-4b -3b -2b -1b 0b 1b 2b 3b 4b 5b 6b 7b 0T 4099T 24579T 4102T 4101T

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. 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. Append the Primary Style Variation of Solid Upright (X'3073') to the end of the DATA string, which results in: DATA ='1B2873307031332E33683073'X. 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 bol ded (emphasized) text. 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) Prefix Spacing Variations Point Size Variations Prefix to setting font Variable spacing 6 point 8 point 9 point 10 point 12 point Primary Style Variations Solid Upright Italic Condensed Condensed Italic Compressed, or Extra Condensed Expanded Outline Inline Shadowed Outline Shadowed Stroke Weight Variations Ultra Thin Extra Thin Thin Extra Light Light 1B2873 3170 3676 3876 3976 313076 313276 3073 3173 3473 3573 3873 323473 333273 363473 31323873 31363073 2D3762 2D3662 2D3562 2D3462 2D3362

ASCII (dec) <esc>(s 1p 6v 8v 9v 10v 12v 0s 1s 4s 5s 8s 24s 32s 64s 128s 160s -7b -6b -5b -4b -3b

Demi Light Semi Light Medium, Book Semi Bold Demi Bold Bold Extra Bold Black Extra Black Ultra Black Typeface Family Variations CG Times Univers Antique Olive Garamond Albertus Arial Times New Roman Helvetica

2D3262 2D3162 3062 3162 3262 3362 3462 3562 3662 3762 3431303154 3431343854 3431363854 3431393754 3433363254 313636303254 313639303154 323435383054

-2b -1b 0b 1b 2b 3b 4b 5b 6b 7b 4101T 4148T 4168T 4197T 4362T 16602T 16901T 24580T

List of Default Font IDs Based on Font Range (sorted by Font Range) 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 Rochester Support Center knowledgebase document 8712759: List of Default Font IDs Based on Font Range:

Font Range 1 - 65 66 - 153 154 - 200 201 - 210 211 - 239 240 - 246 247 - 257 258 - 259 274 - 279 280 - 284 300 - 400

Font Pitch* 10 12 PSM* 13.3 15 5 16.7 18 16.7 20 16.7

Default Font ID 11 87 160 204 222 245 252 252 252 281 400

Font Name Courier 10 Courier 12 Essay Matrix Gothic 13.3 Gothic 15 Courier Courier 17 Courier 17 Courier 17 Gothic Text 20 Courier 17

Notes: 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) 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 10 CPI 12 CPI 13.3 CPI 15 CPI 16.7 CPI 18 CPI 20 CPI CPI Font String (in ASCII) Font String (in Hexadecimal)

10.00 <Esc>(s0p10.00h012v0s0b003T 1B2873307031302E303068303132763073306230303354 12.00 <Esc>(s0p12.00h010v0s0b000T 1B2873307031322E303068303130763073306230303054 13.30 <Esc>(s0p13.30h009v0s0b005T 1B2873307031332E333068303039763073306230303554 15.00 <Esc>(s0p15.00h008v0s0b000T 1B2873307031352E303068303038763073306230303054 16.70 <Esc>(s0p16.60h008v0s0b006T 1B2873307031362E363068303038763073306230303654 17.10 <Esc>(s0p17.10h007v0s0b003T 1B2873307031372E313068303037763073306230303354 20.00 <Esc>(s0p20.00h006v0s0b005T 1B2873307032302E303068303036763073306230303554

10 CPI with 17.10 <Esc>(s0p17.10h007v0s0b000T 1B2873307031372E313068303037763073306230303054 COR 12 CPI with 17.10 <Esc>(s0p17.10h007v0s0b000T 1B2873307031372E313068303037763073306230303054 COR 15 CPI with 20.00 <Esc>(s0p20.00h006v0s0b005T 1B2873307032302E303068303036763073306230303554 COR Default Font Strings for Newer MFRTYPMDL Settings The default font strings sent by Host Print Transform (HPT) when using newer MFRTYPMDL settings where HPT performs its own "best fit" font selection -- such as *LEXOPTRAT, *INFOPRINT1140, *RICOH2045 and *WORKIO_BL: SPLF Attributes 10 CPI 12 CPI 13.3 CPI 15 CPI 16.7 CPI 18 CPI 20 CPI CPI Font String (in ASCII) Font String (in Hexadecimal)

10.00 <Esc>(s0p10.00h012v0s0b003T 1B2873307031302E303068303132763073306230303354 12.00 <Esc>(s0p12.00h010v0s0b000T 1B2873307031322E303068303130763073306230303054 13.30 <Esc>(s0p13.30h009v0s0b005T 1B2873307031332E333068303039763073306230303554 15.00 <Esc>(s0p15.00h008v0s0b000T 1B2873307031352E303068303038763073306230303054 16.70 <Esc>(s0p16.60h008v0s0b006T 1B2873307031362E363068303038763073306230303654 17.10 <Esc>(s0p17.10h007v0s0b003T 1B2873307031372E313068303037763073306230303354 20.00 <Esc>(s0p20.00h006v0s0b005T 1B2873307032302E303068303036763073306230303554

10 CPI with 13.30 <Esc>(s0p13.30h009v0s0b005T 1B2873307031332E333068303039763073306230303554 COR 12 CPI with 16.60 <Esc>(s0p16.60h008v0s0b006T 1B2873307031362E363068303038763073306230303654

COR 15 CPI with 20.00 <Esc>(s0p20.00h006v0s0b005T 1B2873307032302E303068303036763073306230303554 COR

Potrebbero piacerti anche