====================================================================== HP LASERJET III ALIGNMENT AND FONT/SYMBOL SET SUPPORT ====================================================================== -------------------------------------------------------------------- | INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY | | ACCOMPANY THIS DOCUMENT (collectively referred to as an | | Application Note) IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY | | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO | | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A | | PARTICULAR PURPOSE. The user assumes the entire risk as to the | | accuracy and the use of this Application Note. This Application | | Note may be copied and distributed subject to the following | | conditions: 1) All text must be copied without modification and | | all pages must be included; 2) If software is included, all files | | on the disk(s) must be copied without modification (the DOS | | utility DISKCOPY is appropriate for this purpose); 3) All | | components of this Application Note must be distributed together; | | and 4) This Application Note may not be distributed for profit. | | | | Copyright 1991 Microsoft Corporation. All Rights Reserved. | | Microsoft and the Microsoft logo are registered trademarks of | | Microsoft Corporation. | -------------------------------------------------------------------- INTRODUCTION ============ This application note contains information on correcting scalable font alignment problems related to Word printer driver (PRD) files for the Hewlett-Packard LaserJet III, an updated HP3.PRD file, and information regarding the addition of scalable symbol and font sets to existing Word PRD files for the HP LaserJet III. ADDING SYMBOL SET AND FONT SUPPORT ================================== The printer drivers for the Hewlett-Packard (HP) LaserJet III that are shipped with Word version 5.50, and which are available as an supplementally for Word 5.00, do not support all scalable symbol sets and fonts available internally and through HP font sets. To save memory and disk space, these drivers support only the internal scalable fonts CG-Times and Univers in the Roman-8 symbol set. The following font sets are supported in the default symbol sets with HP3FNTS1.PRD/HP3FNTS2.PRD and in the PC-850 international symbol set with HP3FNTI1.PRD/HP3FNTI2.PRD: Distinctive Documents I Compelling Publications I and II Brilliant Presentations I Decorative Words I Support for other symbol sets and font sets can be added by using the MergePRD program to merge the fonts into an existing PRD. MergePRD is included on the enclosed HP LaserJet III Alignment and Font/Symbol Set Support Disk (disk 1 of 1 for the 3.5-inch disk, or disk 2 of 2 for the 5.25-inch disk). MergePRD requires an HP TFM (tagged font metric) file for each typeface from which a font will be added. The TFM file contains important information about the typeface, including the widths of all characters and the symbol sets available. The TFM files for the internal CG-Times and Univers typefaces are included on the enclosed disk(s). TFM files for other typefaces are usually included with the font sets or can be obtained from the font vendor. Before running the MergePRD program and performing the following steps, you must copy the MERGEPRD.EXE file from the enclosed disk, along with the necessary TFM files (such as those included on the enclosed disk) to your Word program directory. To copy these files, do the following: Installation -- Hard Disk System -------------------------------- To install on a hard disk system, do the following: 1. Place the enclosed disk in drive A (3.5-inch: disk 1 of 1; or 5.25- inch: disk 2 of 2). 2. At the DOS prompt, type one of the following commands and press the ENTER key copy a:\mergeprd.exe (to copy the MergePRD program only) copy a:\*.* (to copy MergePRD and the TFM files) where is the location of your Word program directory. For example, if your Word directory is on drive C and is named WORD5, type the following and press the ENTER key: copy a:\*.* c:\word5 NOTE: If you are using 5.25-inch disks and are copying MergePRD AND the TFM files, you must also insert disk 1 of 2 in drive A and repeat this step. Installation -- Dual Floppy Disk System --------------------------------------- To install on a dual floppy disk system, do the following: 1. In drive A, place the working copy of the disk on which your current printer support files are stored (usually labeled "Program"), and place the enclosed disk (3.5-inch: disk 1 of 1; or 5.25-inch: disk 2 of 2) in drive B. 2. At the DOS prompt, type one of the following commands and press the ENTER key: copy b:\mergeprd.exe a:\ (to copy the MergePRD program only) copy b:\*.* a:\ (to copy MergePRD and the TFM files) NOTE: If you are using 5.25-inch disks and are copying MergePRD AND the TFM files, you must also insert disk 1 of 2 in drive B and repeat this step. Using MergePRD to Add Font or Symbol Set Support ------------------------------------------------ 1. Be sure the necessary TFM files, either copied from the enclosed disks or provided through some other software, are located in your Word directory. At the DOS prompt, start the MergePRD program by typing "mergeprd" (without the quotation marks) and pressing ENTER. Choose option 1 at the "Enter Selection:" prompt to choose HP LaserJet as the printer type. 2. Choose option 1 at the main menu. At the prompt, enter the name of the printer driver to optimize, such as HP3.PRD. 3. Choose the LaserJet III or IIID model, whichever will be used with the optimized PRD file. 4. Choose option 4 from the main menu to select the fonts that will be available in the new driver. 5. From the Select Fonts And Sizes menu, choose option 1 to add fonts and sizes from PRDs already entered. 6. Follow the prompts to add all the fonts from the old driver to the new one. 7. Back at the Select Fonts And Sizes menu, choose option 6. This allows the addition of font support with any TFM files. After this, type in the path for the TFM files (if the default is incorrect). 8. Type in the base font filename. This is the name of the TFM file for the normal face of the font (not bold or italic). For example, the Univers base font filename is UNR0000S.TFM. 9. Type "scale" (without the quotation marks) to indicate scalable font sizes. 10. Choose the symbol set desired. 11. Choose the font family within Word. Most fonts will either be Modern (sans-serif fonts) or Roman (serif fonts). For more information about font families, refer to the "Printer Information for Microsoft Word" manual (the end of Chapter 6). 12. Type in the appropriate Word font number (see the "Font Assignment Table" in Chapter 6 of the manual). This is used for compatibility with other drivers. If it is necessary to move files between machines or printers with different printer drivers, this font number must be the same in all drivers for this font. If this will not be the case, accept the default font number. 13. Type in the font name as you want it to appear in Word's Format Character "font name:" field (Word 5.00) or "Font" list box (Word 5.50). 14. If there are more fonts to correct, repeat steps 7 through 12. If not, choose option 7 to return to the main menu. 15. At this point the driver has been defined and must be physically written out. Choose option 7 to create the output PRD and give the new PRD a name. You can now choose the new driver from the Print Options "printer:" field (Word 5.00) or the File Printer Setup "Printer Name" list box (Word 5.50). The new font(s) will be listed in the Format Character "font name:" field (or "Font" list box). CORRECTING LASERJET III SCALABLE FONT ALIGNMENT =============================================== The HP LaserJet III printers use the new AGFA-Intelligraphic scalable font technology. This uses a different font design unit than the Adobe PostScript technology, for which Word's scalable font capabilities were designed. Because of Word's use of high-speed integer math when printing, this difference in design can cause right-alignment problems (experienced primarily when using justification and right-aligned tab stops) when using these scalable fonts. The problem is most noticeable when using odd point sizes. To reduce the effects of this problem, Microsoft developed a method to embed optimized width tables for specific sizes within the printer driver. Since each set of width tables adds about 1K to the driver file size (which will use both extra disk space and memory when Word is run), it is not practical to add all these tables for each font size of every font in the HP LaserJet drivers (one consideration is that a PRD cannot be larger than 62K). When Word version 5.50 was developed, Microsoft found that the 11-point font produced the most conspicuous misalignment, so these width tables were added for the 11- point Univers and CGTimes fonts. The method below describes the steps necessary to perform this modification for whichever font(s) and size(s) are used most commonly, or which have displayed the problems described above. Font vendors supply TFM files with their fonts. These files provide Word with the information necessary to create width tables. The MergePRD program shipped with Word will generate the optimized width tables, and MakePRD can be used to seamlessly integrate these tables into the printer driver. For more information on MergePRD and MakePRD, see the "Printer Information for Microsoft Word" manual. Using MergePRD to Generate Width Tables --------------------------------------- To generate width tables, complete steps 1 through 8 of the "Using MergePRD to Add Font or Symbol Set Support" section of this application note, and then do the following: 9. Type in the sizes desired for the optimized width tables. The sizes must be separated by spaces. If the font is new to the driver, you must first add the scalable version of the font, then repeat steps 6 through 8 to add the optimized fixed-width tables. 10. Choose the symbol set desired. The default HP symbol set is Roman-8 (option 7), and it provides most foreign characters. 11. Choose the font family within Word. Most fonts will either be Modern (sans-serif fonts) or Roman (serif fonts). For more information about font families, refer to the "Printer Information for Microsoft Word" manual (the end of Chapter 6). 12. Type in the appropriate Word font number (see the "Font Assignment Table" in Chapter 6 of the manual). This is used for compatibility with other drivers. If it is necessary to move files between machines or printers with different printer drivers, this font number must be the same in all drivers for this font. If moving files between machines or printers is not necessary, accept the default font number. 13. Type in the font name as you want it to appear in Word's Format Character "font name:" field (Word 5.00) or "Font" list box (Word 5.50). 14. If there are more fonts to correct, repeat steps 7 and 8 of the "Using MergePRD to Add Font or Symbol Set Support" section and steps 9 through 12 of the "Using MergePRD to Generate Width Tables" section. If not, choose option 7 to return to the main menu. 15. At this point the driver has been defined and must be physically written out. Choose option 7 to create the output PRD and give the new PRD a name. At this point you can use this new driver, but the scalable font and the optimized font will appear as separate options in the Format Character menu. This situation does not present a problem if the font with the optimized width tables is chosen when possible (when it contains the desired size), and this method will save you from having to modify the printer driver. However, it tends to be very cumbersome if both fonts are used often, requiring frequent font selections. If these frequent selections are unacceptably inefficient, you can merge the fonts into a single font by making further modifications with the MakePRD utility. USING MAKEPRD TO MERGE THE MODIFIED FONTS ========================================= In addition to generating width tables, you can use the MAKEPRD utility, which is supplied with Microsoft Word, to merge the corrected fonts into an existing PRD file by doing the following: 1. Convert the new printer driver to text using the MakePRD program. For example, if the driver is named HPNEW.PRD, typing the following command and pressing ENTER creates a file called HPNEW.DOC that contains the text version of the driver: makeprd -t hpnew.prd hpnew.doc 2. Start Word and load HPNEW.DOC. 3. Locate the printer sequence description (PSD) for the font you want to modify. The PSD will start with "FontSize:0" and end with "LineSpacing:50". This is the scalable PSD for this font (see Figure 1). ----------------------------------------------------------------- | FIGURE 1 | | | | FONT DESCRIPTION | | | | {F16|| CTP:NIL | | cPSDs:1 | | | | FontSize:0 --+ | | Wtps:W4 W5 W6 W7 | | | beginmod:0 "^[(10U^[(s5t0s0b1P" | | | endmod:0 "^[(8U^[(s3t12vpsb10H" | | | beginItalicmod:0 "^[(10U^[(s5t1s0b1P" | Typical scalable | | endItalicmod:0 "^[(8U^[(s3t12vpsb10H" |-- printer sequence | | beginBoldmod:0 "^[(10U^[(s5t0s3b1P" | description (PSD) | | endBoldmod:0 "^[(8U^[(s3t12vpsb10H" | | | beginItalBoldmod:0 "^[(10U^[(s5t1s3b1P" | | | endItalBoldmod:0 "^[(8U^[(s3t12vpsb10H" | | | DLF:0 | | | LineSpacing:50 --+ | | FontName:CGTimes | | }F | ----------------------------------------------------------------- NOTE: For more information on this step, see the "Printer Information for Microsoft Word" manual (page 318 of the version 5.5 manual or page 222 of the version 5.0 manual). 4. If the default font number was chosen when using MergePRD, the PSD for the font with the optimized width tables will immediately follow this scalable PSD. Locate the font description that contains the optimized width tables. Each font description will begin with an opening brace, an uppercase F (for "font"), and the font number. Each will end with a closing brace and an uppercase F. For example, Figure 1 shows font number 16, named CGTimes. The text will display the same name you entered when performing the MergePRD modifications (if the name was unique), and the FontSize field will be a number other than 0 (zero); LineSpacing will be a number other than 50 (because LineSpacing is set to 50 only when the font is scalable). 5. Cut (delete) the PSD(s) from the optimized font and paste (insert) it below the last PSD in the scalable version of the font. It is important to express the FontSize field in half points. This means that an 11-point font should be listed as FontSize:22. 6. Copy the scalable PSD (the one with FontSize:0) so that it appears between each nonconsecutive font size as well as at the end of the font listings. The standard Word 5.50 driver has PSDs listed with font values of 0 (zero), 22, then 0 again. If, for example, you add point size 17 to this, the PSDs with their font size values must appear as 0, 22, 0, 34, 0. This instructs Word to use scalable fonts to size 11, where it will use the optimized width table (specified in the WTPS line of the PSD), then scaled fonts to point size 17, above which it will use the scaling feature. An example of a font with these sizes is listed in Figure 2. 7. Change the "cPSDs:" value to indicate the total number of PSDs used in the font (the cPSDs value is the PSD count). The example in Figure 1 has only one PSD and shows "cPSDs:1". Similarly, Figure 2 has five PSDs and shows "cPSDs:5". 8. Remove the old font description from which the optimized PSDs were cut. Because this font has been merged into the scalable version, the old font will no longer be used and can be completely removed. 9. Save the modified printer driver (in text format) and exit Word. 10. Convert the new printer driver back to its binary form using the MakePRD program. In this example, we've named the completed driver HPFINAL.PRD, but you can name it whatever you want. If the document file was named HPNEW.DOC, type the following command at the DOS prompt and press ENTER to create a file called HPFINAL.PRD that will contain the modified printer driver: MAKEPRD -p HPFINAL.PRD HPNEW.DOC At this point the driver is completed. If an error is received when running the MakePRD program, check the modifications in the driver text file. The newly created printer driver will function exactly the same as the original and will use the new width tables. The modification should eliminate any rounding errors caused by Word's high-speed print engine in those font sizes. ---------------------------------------------------------- | FIGURE 2 | | | | | | FONT DESCRIPTION | | | | {F16 | | CTP:NIL | | cPSDs:5 | | | | FontSize:0 | | Wtps:W8 W9 W10 W11 | | beginmod:0 "^[(10U^[(s5t0s0b1P" | | endmod:0 "^[(8U^[(s3t12vpsb10H" | | beginItalicmod:0 "^[(10U^[(s5t1s0b1P" | | endItalicmod:0 "^[(8U^[(s3t12vpsb10H" | | beginBoldmod:0 "^[(10U^[(s5t0s3b1P" | | endBoldmod:0 "^[(8U^[(s3t12vpsb10H" | | beginItalBoldmod:0 "^[(10U^[(s5t1s3b1P" | | endItalBoldmod:0 "^[(8U^[(s3t12vpsb10H" | | DLF:0 | | LineSpacing:50 | | | | FontSize:22 | | Wtps:W12 W13 W14 W15 | | beginmod:0 "^[(10U^[(s5t0s0b1p11V" | | endmod:0 "^[(8U^[(s3t12vpsb10H" | | beginItalicmod:0 "^[(10U^[(s5t1s0b1p11V" | | endItalicmod:0 "^[(8U^[(s3t12vpsb10H" | | beginBoldmod:0 "^[(10U^[(s5t0s3b1p11V" | | endBoldmod:0 "^[(8U^[(s3t12vpsb10H" | | beginItalBoldmod:0 "^[(10U^[(s5t1s3b1p11V" | | endItalBoldmod:0 "^[(8U^[(s3t12vpsb10H" | | DLF:15 | | LineSpacing:11 | | | | FontSize:0 | | Wtps:W8 W9 W10 W11 | | beginmod:0 "^[(10U^[(s5t0s0b1P" | | endmod:0 "^[(8U^[(s3t12vpsb10H" | | beginItalicmod:0 "^[(10U^[(s5t1s0b1P" | | endItalicmod:0 "^[(8U^[(s3t12vpsb10H" | | beginBoldmod:0 "^[(10U^[(s5t0s3b1P" | | endBoldmod:0 "^[(8U^[(s3t12vpsb10H" | | beginItalBoldmod:0 | "^[(10U^[(s5t1s3b1P" | | endItalBoldmod:0 "^[(8U^[(s3t12vpsb10H" | | DLF:0 | | LineSpacing:50 | | | | FontSize:34 | | Wtps:W16 W17 W18 W19 | | beginmod:0 "^[(8U^[(s5t0s0b1p7.1h17.0V" | | endmod:0 "^[(8U^[(s3t12vpsb10H" | | beginItalicmod:0 "^[(8U^[(s5t1s0b1p7.1h17.0V" | | endItalicmod:0 "^[(8U^[(s3t12vpsb10H" | | beginBoldmod:0 "^[(8U^[(s5t0s3b1p7.1h17.0V" | | endBoldmod:0 "^[(8U^[(s3t12vpsb10H" | | beginItalBoldmod:0 "^[(8U^[(s5t1s3b1p7.1h17.0V" | | endItalBoldmod:0 "^[(8U^[(s3t12vpsb10H" | | DLF:15 | | LineSpacing:17 | | | | FontSize:0 | | Wtps:W8 W9 W10 W11 | | beginmod:0 "^[(10U^[(s5t0s0b1P" | | endmod:0 "^[(8U^[(s3t12vpsb10H" | | beginItalicmod:0 "^[(10U^[(s5t1s0b1P" | | endItalicmod:0 "^[(8U^[(s3t12vpsb10H" | | beginBoldmod:0 "^[(10U^[(s5t0s3b1P" | | endBoldmod:0 "^[(8U^[(s3t12vpsb10H" | | beginItalBoldmod:0 "^[(10U^[(s5t1s3b1P" | | endItalBoldmod:0 "^[(8U^[(s3t12vpsb10H" | | DLF:0 | | LineSpacing:50 | | FontName:CGTimes | | }F | | | ----------------------------------------------------------