IBM Support

Creating a Font Group Definition

Troubleshooting


Problem

This document provides instructions for printing operating system spooled files with different fonts when using Host Print Transform (HPT) to an HP LaserJet compatible printer.

Resolving The Problem

This document provides instructions for printing operating system spooled files with different fonts when using Host Print Transform (HPT) to an HP LaserJet compatible printer. This is done by retrieving and modifying a Workstation Customization Table (WSCST) and adding or changing the Font Group Entry (FNTGRPE) tags.

Note: Examples in this document are using the HP PCL printer language.

This document was last updated on 24 October 2013.

Caution: These instructions are provided as is. Any assistance with editing the Workstation Customization Table must be done through a consulting agreement.




Basic Steps for Creating and Using a Workstation Customization Object

The following are the basic steps for creating and using a modified workstation customization object or *WSCST object:

Step 1:Retrieve the WSCST Source Code
Step 2:Edit the WSCST Source Code
Step 3:Create the *WSCST Object
Step 4:Specify the *WSCST Object in the Printer Device, RMTOUTQ or Printer Session

Note: Regardless of the particular issues you are attempting to resolve, these steps must always be taken. This information is intended to provide a 'quick start' to creating a WSCST object for users who have at least some familiarity with creating them and with configuring printers.

Additional, in-depth details for creating a WSCST object can be found in the following document:

N1010140: Instructions for Modifying a Workstation Customizing Object (WSCST)



    • - Step 1: Retrieve the WSCST Source Code



      Retrieve the WSCST source code using the Retrieve WSCST source (RTVWSCST) command. For example:

      RTVWSCST DEVTYPE(*TRANSFORM) MFRTYPMDL(*LEXOPTRAT) SRCMBR(FONTGRP)
               SRCFILE(QGPL/QTXTSRC)
               TEXT('Print on ASCII laser with an added Font Group')

      and press the Enter key.

      Notes:

      oSpecify a value for the Manufacturer type and model (MFRTYPMDL) parameter that is appropriate for your printer, or the value for the MFRTYPMDL parameter that is currently being used. The above example specified a MFRTYPMDL setting of *LEXOPTRAT, but your existing printer may be using another value for this parameter.
      oSet the Source member (SRCMBR) parameter to the name that you intend to use for the *WSCST object when created. The following examples of the RTVWSCST command use a source member name of "FONTGRP", which is the name of the *WSCST object specified in the example of the CRTWSCST command in Step 3.


      • - Step 2: Edit the WSCST Source Code

        ] Edit the WSCST source member by using the Programming Development Manager (PDM) or the Source Entry Utility (SEU).

        o To edit the WSCST source member using PDM, use the Work with Members Using PDM (WRKMBRPDM) command, for example: WRKMBRPDM FILE(QGPL/QTXTSRC) MBR(FONTGRP) and press the Enter key, then select Option 2 (Edit) on the source member and press the Enter key again.
        o To edit the WSCST source member using SEU, use the Start Source Entry Utility (STRSEU) command, for example: STRSEU SRCFILE(QGPL/QTXTSRC) SRCMBR(FONTGRP) and press the Enter key.
        Make any changes necessary to the WSCST object source code. Refer to the following sections, beginning with Forcing HPT to Print Spooled Files in Portrait Rather Than Landscape, to make your changes, then save and exit. Continue with Step 3. [


      • - Step 3: Create the *WSCST Object

        ] Create the WSCST object using the Create WSCST (CRTWSCST) command, for example: CRTWSCST WSCST(QGPL/CONT132) SRCMBR(*WSCST) TEXT(*SRCMBRTXT) SRCFILE(QGPL/QTXTSRC) and press the Enter key. Notes:

        o The Source member (SRCMBR) parameter can be set to the default value of *WSCST if the source member has the same name as the *WSCST object that you are creating.
        o If the Text 'description' (TEXT) parameter is set to the default value of *SRCMBRTXT, the TEXT parameter used in the source file member will also be used in the TEXT parameter on the *WSCST that you are creating.
        [


      • - Step 4: Specify the *WSCST Object in the Printer Device, RMTOUTQ or Printer Session

        ] Specify the *WSCST object in the Workstation customizing object (WSCST) parameter in the printer device description, the Remote Output Queue (RMTOUTQ) description, the PC5250 printer, or the TN5250e printer session:

        o To specify the *WSCST object in a printer device description, use the Change Device Desc (Printer) (CHGDEVPRT) command. For example: CHGDEVPRT DEVD(device_name) TRANSFORM(*YES) MFRTYPMDL(*WSCSTCONT132) WSCST(QGPL/CONT132) and press the Enter key. Note: For more information on specifying a modified *WSCST object in a *LAN, *LCL or *RMT printer device description, refer to one of the following documents: N1010288: Using Host Print Transform (HPT) with a *LAN Device Description N1019712: Using Host Print Transform (HPT) with a *LCL or *RMT Device Description
        o To specify the *WSCST object in a Remote Output Queue (RMTOUTQ) description, use the Change Output Queue (CHGOUTQ) command. For example: CHGOUTQ OUTQ(queue_name) TRANSFORM(*YES) MFRTYPMDL(*WSCSTCONT132) WSCST(QGPL/CONT132) and press the Enter key. Note: For more information on specifying a modified *WSCST object in a Remote Output Queue (RMTOUTQ) description, refer to the following document: N1019713: Using Host Print Transform (HPT) with a Remote Output Queue (RMTOUTQ)
        o To specify the *WSCST object in a PC5250 printer emulation session, do the following: a In the PC5250 printer session, click on Communication > Configure. b Click on the Setup button. c In the Configure PC5250 Printer Emulation window, select the box next to Transform Print Data to ASCII on the iSeries and select the Printer Model value of *WSCST. d In the same window, specify the name of the WSCST in the Customizing Object parameter and the library where it is found in the Library parameter (for example, Customizing Object HP4 and Library QGPL). e Click OK three times. f Click File > Save to save the configuration. Note: For more information on specifying a modified *WSCST object in a PC5250 printer emulation session, refer to the following document: N1019470: Using Host Print Transform (HPT) with a PC5250 Printer Session at V5R1M0 and Above
        o To specify the *WSCST object in a third-party TN5250 printer emulation session, or in the printer hardware settings on a printer that has built-in support for TN5250, contact your software or hardware vendor. Note: For more information on specifying a modified *WSCST object in a third-party TN5250 printer emulation session, refer to the following document: N1019670: Using Host Print Transform (HPT) with a Third Party Emulation Package
        Note: If any changes are made to the WSCST object source code after the CRTWSCST command has been issued, it is necessary to issue the CRTWSCST command again. The printer writer must be ended and restarted for the changes to take effect. [





      Creating a Font Group Definition

      The following are the tags that you need to change to add the add a new font group. Go down to the section where the :FNTGRPE tags are. If you want to create a new group, then copy a section as indicated below. If want to change only the font of an existing group, find the group entry, and change the FNTSTR parameter.

      Copy a complete section with the following tags.

          :FNTGRPE
           MINFID  =
           MAXFID  =
           FNTSTR  =
           FNTEND  =
           FNTWTH  =


      Copy to the line right before:

          :EFNTGRP.

      This is the template that must be modified:

          :FNTGRPE
           MINFID  =
           MAXFID  =
           FNTSTR  =  (proportional or fixed font examples below)
           FNTEND  =  ''X
           FNTWTH  =  ''X.   (if using fix pitch fonts then
                              use this.  If proportional then
                              copy the whole section of an
                              existing font group.)


      MINFID and MAXFID

      The Minimum Font ID (MINFID) and Maximum Font ID (MAXFID) specify the range of fonts that are affected a particular Font Group Entry (FNTGRPE) tag.

      Note: For more information on the MINFID and MAXFID parameters, refer to the section titled List of Default Font IDs Based on Font Range (sorted by Font Range) below.

      FNTSTR

      The Font String (FNTSTR) parameter specifies the font string, in hexadecimal, to select the desired font in the printer hardware.

      FNTEND

      The Font End (FNTEND) parameter is an optional parameter that specifies the font string, in hexadecimal, to end the font request. If no font string is needed to end the font request, then the FNTEND parameter must be set to ''X (null).

      FNTWTH

      The Font Width (FNTWTH) parameter is an optional parameter that specifies the individual character widths, in 1/1440-inch increments, for the font group range. If specified, this must be either a 256-byte or 512-byte hexadecimal value. If no font width data is defined, the FNTWTH parameter must be set to ''X (null).


      Font Group Entry (FNTGRPE) Examples

      This is an example for a 10 cpi font group 1 - 65:

      Fntstr will print at 12 cpi using a mono spaced font.

          :FNTGRPE
           MINFID  =  1
           MAXFID  =  65
           FNTSTR  ='1B2873307031322E3068307330623054'X
           FNTEND  =  ''X
           FNTWTH  =  ''X.


      A variation using VARIABLE spacing:

      FNTSTR ='1B287331703676317330623431303154'X

      Breakdown:
        1B2873  - prefix to setting font
       3170    - proportional spacing
       3676    - point size (6p)
       3173    - primary style: upright (solid)
       3062    - stroke weight: medium (book or text)
       3431303154 - typeface family: CG TIMES


      FNTWTH =
                       /* -0-1-2-3-4-.....                    */
                          22ADAEA78F......                          /* 0- */


      The FNTWTH is set up for each character for proportional or typographic fonts. This chart covers each code point. For example, x'01' has x'AD'. To calculate the width, convert x'AD' to decimal (173), then divide it into 1440s (173/1440). That is the font width of the x'01' character, if that were a character. Using proportional spacing might not be a good option because the fntwth calculations would be very difficult.

      For additional information about specifying a PCL5 font string in the FNTSTR portion of the FNTGRPE tag, refer to the following Rochester Support Center knowledgebase document:

      N1010138: Breakdown of HP PCL5 Font Strings

      To create the WSCST object and implement it, perform Steps 3 and 4 (above).

        • - 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
          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)

          ] 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
          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
          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 CPI Font String (in ASCII) Font String (in Hexadecimal)
          10 CPI 10.00 (s0p10.00h012v0s0b003T 1B2873307031302E303068303132763073306230303354
          12 CPI 12.00 (s0p12.00h010v0s0b000T 1B2873307031322E303068303130763073306230303054
          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
          [

        [{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"Print","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"Version Independent;7.1.0;7.1;6.1.1;6.1.0;6.1;5.4.5;5.4.0;5.3.5;5.3.0;5.2.0","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Product":{"code":"SSC52E","label":"IBM i 7.1"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":" ","Platform":[{"code":"","label":null}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}},{"Product":{"code":"SSC3X7","label":"IBM i 6.1"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":" ","Platform":[{"code":"","label":null}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}}]

        Historical Number

        8690003

        Document Information

        Modified date:
        18 December 2019

        UID

        nas8N1010146