home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / books / wdfonts.db < prev    next >
Encoding:
Text File  |  1991-03-01  |  283.4 KB  |  5,450 lines

  1. %@1@%%@AB@%Microsoft  Windows  Device Development Kit - Printers and Fonts Kit%@AE@%%@EH@%%@NL@%
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10. ────────────────────────────────────────────────────────────────────────────%@NL@%
  11.  %@AB@%Microsoft (R) Windows (tm) Device Development Kit - Printers and Fonts Kit%@AE@%%@NL@%
  12.  
  13.       %@AB@%development tools for providing Microsoft Windows device support
  14.                                 %@AB@%VERSION 3.0%@AE@%
  15. ────────────────────────────────────────────────────────────────────────────%@NL@%
  16.  
  17.  
  18. for the MS-DOS (R) or PC-DOS Operating System%@NL@%
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26. Microsoft Corporation %@NL@%
  27.  
  28. Information in this document is subject to change without notice and does
  29. not represent a commitment on the part of Microsoft Corporation. The
  30. software described in this document is furnished under a license agreement
  31. or nondisclosure agreement. The software may be used or copied only in
  32. accordance with the terms of the agreement. It is against the law to copy
  33. the software on any medium except as specifically allowed in the license or
  34. nondisclosure agreement. No part of this manual may be reproduced or
  35. transmitted in any form or by any means, electronic or mechanical, including
  36. photocopying and recording, for any purpose without the express written
  37. permission of Microsoft.  
  38. U.S. Government Restricted Rights
  39.  
  40.  
  41. The SOFTWARE and documentation are provided with RESTRICTED RIGHTS. Use,
  42. duplication, or disclosure by the Government is subject to restrictions as
  43. set forth in subparagraph (c) (1) (ii) of the Rights in Technical Data and
  44. Computer Software clause at DFARS 252.227-7013 or subparagraphs (c) (1) and
  45. (2) of the Commercial Computer Software 
  46. ─ Restricted Rights at 48 CFR 52.227-19, as applicable.
  47. Contractor/manufacturer is Microsoft Corporation/One Microsoft Way/Redmond,
  48. WA 98052-6399.%@NL@%
  49.  
  50.  
  51. (C) Copyright Microsoft Corporation, 1990. All rights reserved.
  52.  
  53. Simultaneously published in the U.S. and Canada.%@NL@%
  54.  
  55.  
  56. Printed and bound in the United States of America.%@NL@%
  57.  
  58.  
  59. Microsoft, MS, MS-DOS, GW-BASIC, QuickC, CodeView, the 
  60. Microsoft logo, and XENIX are registered trademarks and Windows is 
  61. a trademark of Microsoft Corporation.%@NL@%
  62.  
  63. Aldus and PageMaker are registered trademarks of Aldus 
  64. Corporation.%@NL@%
  65.  
  66. Apple, LaserWriter, and Macintosh are registered trademarks 
  67. of Apple Computer, Inc.%@NL@%
  68.  
  69. Hewlett-Packard, HP, LaserJet, and PCL are registered 
  70. trademarks of Hewlett-Packard Company.%@NL@%
  71.  
  72. IBM and PS/2 are registered trademarks of International 
  73. Business Machines Corporation.%@NL@%
  74.  
  75. Micrografx is a trademark of Micrografx, Inc.%@NL@%
  76.  
  77. PostScript is a registered trademark and Adobe and Adobe 
  78. Illustrator are trademarks of Adobe Systems, Inc.%@NL@%
  79.  
  80. The Symbol fonts provided with Windows 3.0 are based 
  81. on the CG Times font, a product of AGFA Compugraphic Division of Agfa 
  82. Corporation.%@NL@%
  83.  
  84. Document No. SY0329c-300-R00-1089%@NL@%
  85.  
  86. %@NL@%
  87.  
  88.  
  89.  
  90.  
  91. %@1@%%@AB@%Table of Contents%@AE@%%@EH@%%@NL@%
  92. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  93.  
  94.  
  95.  
  96. %@AB@%Introduction%@AE@%%@BO:        2d65@%
  97.      Background%@BO:        3381@%
  98.      Windows Font Requirements%@BO:        3ccf@%
  99.             Bitmap Screen Fonts%@BO:       1ed1d@%
  100.             Downloadable Fonts%@BO:        453f@%
  101.             Printer Font Metrics Files%@BO:        4890@%
  102.  
  103.  
  104. %@AB@%PART I%@AE@%%@BO:        4baf@%  %@AB@%Fonts%@AE@%
  105. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  106.  
  107.  
  108. %@AB@%Chapter 1%@AE@%%@BO:        4ded@%  %@AB@%Screen Fonts for Windows%@AE@%
  109.  
  110.      1.1%@BO:        511c@%   The Aspect-Ratio Classes of Display Devices
  111.      1.2%@BO:        5457@%   Translating Point Sizes into Line Sizes
  112.      1.3%@BO:        58f2@%   Choosing the Correct Range of Line Sizes
  113.             1.3.1%@BO:        6053@%    Greeking
  114.             1.3.2%@BO:        6178@%    Proof Versus Draft (Doubling and Tripling) Quality
  115.             1.3.3%@BO:        6491@%    Vector Font Substitution
  116.             1.3.4%@BO:        6604@%    Down-sizing to Match Widths
  117.      1.4%@BO:        688f@%   Recommended Screen Font Sizes
  118.  
  119. %@AB@%Chapter 2%@AE@%%@BO:        741e@%  %@AB@%Printer Font Metrics (PFM) Files%@AE@%
  120.  
  121.      2.1%@BO:        7779@%   Listing .PFM Files in WIN.INI
  122.      2.2%@BO:        9135@%   Printer Font Install Directory File
  123.      2.3%@BO:        945b@%   .PFM File Organization
  124.             2.3.1%@BO:        99d7@%    PFM Header and Width Table
  125.             2.3.2%@BO:        a140@%    PFMEXTENSION Data Structure
  126.             2.3.3%@BO:        b0e5@%    EXTTEXTMETRIC Data Structure
  127.             2.3.4%@BO:        d027@%    Font Scaling: etmMasterHeight and etmMasterUnits
  128.             2.3.5%@BO:        e431@%    KERNPAIR Data Structure
  129.             2.3.6%@BO:        ebe3@%    KERNTRACK Data Structure
  130.      2.4%@BO:        f466@%   Printer Cartridge Metrics (PCM) Files
  131.             2.4.1%@BO:        fbb2@%    WIN.INI Additions
  132.             2.4.2%@BO:        fe7f@%    Cartridge Installation
  133.             2.4.3%@BO:       1040e@%    FINSTALL.DIR Syntax
  134.  
  135. %@AB@%Chapter 3%@AE@%%@BO:       10730@%  %@AB@%The PFM Editor%@AE@%
  136.  
  137.      3.1%@BO:       110c5@%   The Main Window
  138.      3.2%@BO:       11d34@%   The File Menu
  139.      3.3%@BO:       1242e@%   The Metrics Menu
  140.             3.3.1%@BO:       1272b@%    The Basic Metrics Dialog Box
  141.             3.3.2%@BO:       13706@%    The Extended Metrics Dialog Box
  142.             3.3.3%@BO:       143cb@%    The Effects Metrics Dialog Box
  143.      3.4%@BO:       147c0@%   The Tables Menu
  144.             3.4.1%@BO:       14993@%    The Width Table Dialog Box
  145.             3.4.2%@BO:       14e1c@%    The Pair Kerning Table Dialog Box
  146.             3.4.3%@BO:       15332@%    The Track Kerning Table Dialog Box
  147.      3.5%@BO:       155f5@%   The Driver Menu
  148.      3.6%@BO:       161b5@%   Creating .PCM Files
  149.      3.7%@BO:       16d76@%   The PFM Editor Error Messages
  150.  
  151. %@AB@%Chapter 4%@AE@%%@BO:       17f96@%  %@AB@%.PFM Files for PostScript Printers%@AE@%
  152.  
  153.      4.1%@BO:       18144@%   Format of the PostScript .PFM File
  154.      4.2%@BO:       18af4@%   EXTTEXTMETRIC Data Structure
  155.      4.3%@BO:       19187@%   Driver-Specific Data Structure
  156.  
  157. %@AB@%Chapter 5%@AE@%%@BO:       19495@%  %@AB@%.PFM Files for PCL Printers%@AE@%
  158.  
  159.      5.1%@BO:       19648@%   Format of the PCL .PFM File
  160.      5.2%@BO:       19df8@%   EXTTEXTMETRIC Data Structure
  161.      5.3%@BO:       1a1df@%   Driver-Specific Data Structure
  162.      5.4%@BO:       1bb98@%   Kerning Tables
  163.      5.5%@BO:       1bce9@%   Scalable PCL Fonts
  164.  
  165.  
  166. %@AB@%PART II%@AE@%%@BO:       1cbf5@%  %@AB@%The PCL Driver%@AE@%
  167. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  168.  
  169.  
  170. %@AB@%Chapter 6%@AE@%%@BO:       1d0b5@%  %@AB@%Overview of the PCL Driver%@AE@%
  171.  
  172.  
  173. %@AB@%Chapter 7%@AE@%%@BO:        3381@%  %@AB@%WIN.INI Flags%@AE@%
  174.  
  175.      7.1%@BO:        3ccf@%   Summary of Flags
  176.      7.2%@BO:       1ed1d@%   Details on Flags
  177.             7.2.1%@BO:        453f@%    Cartindex%@AB@%n%@AE@%
  178.             7.2.2%@BO:        4890@%    Cartridgen
  179.             7.2.3%@BO:       1f3e1@%    Copies
  180.             7.2.4%@BO:       1fad9@%    Duplex
  181.             7.2.5%@BO:       1fe93@%    <Filename>
  182.             7.2.6%@BO:       200d4@%    FontSummary
  183.             7.2.7%@BO:       20a2a@%    Fsvers
  184.             7.2.8%@BO:       20d8d@%    MaxFontSummary
  185.             7.2.9%@BO:       211fb@%    Numcart
  186.             7.2.10%@BO:       215f4@%   Options
  187.             7.2.11%@BO:       2294e@%   Orient
  188.             7.2.12%@BO:       22b22@%   Paper
  189.             7.2.13%@BO:       22d90@%   Prtcaps
  190.             7.2.14%@BO:       24081@%   Prtindex
  191.             7.2.15%@BO:       2421a@%   Prtresfac
  192.             7.2.16%@BO:       24432@%   Sfdir
  193.             7.2.17%@BO:       24505@%   Sfdlbat
  194.             7.2.18%@BO:       2477e@%   Sfdlstyle
  195.             7.2.19%@BO:       24b75@%   SoftFontn
  196.             7.2.20%@BO:       26009@%   SoftFonts
  197.             7.2.21%@BO:       26096@%   Tray
  198.             7.2.22%@BO:       26356@%   White_text
  199.  
  200. %@AB@%Chapter 8%@AE@%%@BO:       26c8e@%  %@AB@%Permanent Soft Fonts%@AE@%
  201.  
  202.      8.1%@BO:       26fe9@%   Setting Up Fonts for Download
  203.      8.2%@BO:       2946b@%   Tracking Permanent Fonts in the WIN.INI File
  204.  
  205. %@AB@%Chapter 9%@AE@%%@BO:       2a826@%  %@AB@%FINSTALL.DIR%@AE@%
  206.  
  207.      9.1%@BO:       2af4d@%   Logical Drive Definition
  208.      9.2%@BO:       2bc22@%   Font Family Definition
  209.      9.3%@BO:       2ec42@%   Installing Without the FINSTALL.DIR File
  210.      9.4%@BO:       2f0c4@%   Sample FINSTALL.DIR File
  211.  
  212. %@AB@%Chapter 10%@AE@%%@BO:       2fae0@%  %@AB@%Developers' Tools%@AE@%
  213.  
  214.      10.1%@BO:       2fc79@%  Building an FINSTALL.DIR File
  215.      10.2%@BO:       3013c@%  Adding Fonts
  216.  
  217. %@AB@%Chapter 11%@AE@%%@BO:       30b6c@%  %@AB@%.PFM Generator%@AE@%
  218.  
  219.      11.1%@BO:       30eac@%  Installer PFM Versus Vendor-Supplied PFM
  220.      11.2%@BO:       31186@%  File Naming Scheme
  221.      11.3%@BO:       3164a@%  Regenerating .PFM Files
  222.      11.4%@BO:       322a1@%  PFM Data From Font Data
  223.             11.4.1%@BO:       323fe@%    PFM Header
  224.             11.4.2%@BO:       33a19@%    EXTTEXTMETRIC Data Structure
  225.             11.4.3%@BO:       3470f@%    Device-Specific Data Structure
  226.  
  227. %@AB@%Chapter 12%@AE@%%@BO:       34bc7@%  %@AB@%Installer Scenarios%@AE@%
  228.  
  229.      12.1%@BO:       34eb6@%  Selecting Printer Fonts
  230.      12.2%@BO:       35c64@%  Selecting Screen Fonts
  231.      12.3%@BO:       36c2d@%  Recovering Soft Fonts From a WIN.INI Change
  232.      12.4%@BO:       37726@%  A Quick Method for Moving Fonts
  233.      12.5%@BO:       388c5@%  Building a Floppy Disk Set of Fonts
  234.      12.6%@BO:       39e19@%  Setting Up Fonts on a Network
  235.      12.7%@BO:       3b331@%  Setting Up .PFM Files for Resident and Cartridge Fonts
  236.  
  237.  
  238. %@AB@%PART III%@AE@%%@BO:       3cbcf@%  %@AB@%The PostScript Driver%@AE@%
  239. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  240.  
  241.  
  242. %@AB@%Chapter 13%@AE@%%@BO:       3cff1@%  %@AB@%Overview of the PostScript Driver%@AE@%
  243.  
  244.  
  245. %@AB@%Chapter 14%@AE@%%@BO:       3d822@%  %@AB@%New Features%@AE@%
  246.  
  247.      14.1%@BO:       3d9d3@%  Color
  248.      14.2%@BO:       3dd76@%  Device-Independent Bitmaps
  249.      14.3%@BO:       3e0c1@%  External Printer and Printer Font Metrics Support
  250.      14.4%@BO:       3e406@%  PostScript Header Support
  251.      14.5%@BO:       3e756@%  The Error Handler
  252.      14.6%@BO:       3eab5@%  GDI StretchBlt() Support
  253.      14.7%@BO:       3ee27@%  Device Initialization
  254.      14.8%@BO:       3f03e@%  Rotated Text
  255.      14.9%@BO:       3f1ab@%  EPS Printing
  256.  
  257. %@AB@%Chapter 15%@AE@%%@BO:       3f586@%  %@AB@%Escapes%@AE@%
  258.  
  259.  
  260. %@AB@%Chapter 16%@AE@%%@BO:       3fb17@%  %@AB@%WIN.INI Settings%@AE@%
  261.  
  262.      16.1%@BO:       3fc54@%  Global Initialization Section
  263.      16.2%@BO:       3fef3@%  Per-Port Initialization Section
  264.      16.3%@BO:       402a8@%  Use of Soft Fonts
  265.             16.3.1%@BO:       4075e@%    Adobe Soft Font Format (.AGB)
  266.             16.3.2%@BO:       40a09@%    Non-Adobe Soft Font Format
  267.  
  268. %@AB@%Chapter 17%@AE@%%@BO:       40b0f@%  %@AB@%External Printer Descriptions Support%@AE@%
  269.  
  270.      17.1%@BO:       412df@%  Tools Provided
  271.      17.2%@BO:       41998@%  Building an External Printer Distribution Disk
  272.      17.3%@BO:       42235@%  The MKPRN Compiler
  273.      17.4%@BO:       4258e@%  The .PPD File Format
  274.      17.5%@BO:       42845@%  Keywords and Extensions
  275.      17.6%@BO:       4540f@%  Running the MKPRN Compiler
  276.      17.7%@BO:       45a7a@%  Installing the .WPD File
  277.      17.8%@BO:       462c1@%  Limitations
  278.  
  279. %@AB@%Chapter 18%@AE@%%@BO:       46528@%  %@AB@%PostScript Printer Communications%@AE@%
  280.  
  281.  
  282.  
  283. %@CR:C6A-Intro   @%%@1@%%@AB@%Introduction%@AE@%%@EH@%%@NL@%
  284. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  285.  
  286. The %@AI@%Microsoft%@AE@%(R) %@AI@%Windows%@AE@%(tm) %@AI@%Printers and Fonts Kit%@AE@% provides documentation
  287. for third-party developers working on printer and screen fonts for use with
  288. Windows applications on the PC. Specific information is provided on how to
  289. ma ke fonts compatible with the Microsoft Windows environment. The %@AI@%Microsoft
  290. %@AI@%Windows Printers and Fonts Kit%@AE@% is intended for use by both hardware and
  291. software engineers and is divided into the following three parts:  %@NL@%
  292.  
  293.  
  294.   ■   Part 1, "Fonts," which contains information on generating standard
  295.       Windows .PFM and .PCM files plus details on .PFM files for
  296.       PostScript(R) and PCL(R) printers and .PCM files for PCL printers. It
  297.       also discusses screen fonts for Windows.%@NL@%
  298.  
  299.   ■   Part 2, "The PCL Driver," which explains version 3.3 of the Windows
  300.       PCL/HP(R) LaserJet(R) printer driver.%@NL@%
  301.  
  302.   ■   Part 3, "The PostScript Driver," which explains version 3.3 of the
  303.       Windows PostScript printer driver.%@NL@%
  304.  
  305.  
  306. If you have questions regarding information in this document, please contact
  307. Microsoft Product Support Services. For additional information on
  308. miscellaneous device-specific topics, as well as information that became
  309. available after this document went to press, see the README.TXT file on the
  310. last disk of the %@AI@%Microsoft Wind ows Device Development%@AE@% Kit set of disks.  %@NL@%
  311.  
  312.  
  313. %@2@%%@CR:C6A00070001 @%%@AB@%Background%@AE@%%@EH@%%@NL@%
  314.  
  315. Laser printer output, which features a rich variety of fonts, has made
  316. today's personal computer users more aware of typography and quality output.
  317. Dot-matrix printer output, once considered acceptable for final copy, is now
  318. regarded as draft quality. Daisywheel printers, which use typewriter-like
  319. fonts, are also less acceptable. And new font offerings, such as those of
  320. the Apple(R) LaserWriter(R) Plus, HP LaserJet III, and the IBM(R) Personal
  321. Pageprinter, promise to continue the trend toward typographic-quality
  322. output.  %@NL@%
  323.  
  324. The Microsoft Windows and OS/2 Presentation Manager operating environments
  325. are becoming the standard graphics environment for PC-compatible computers,
  326. particularly in the areas of WYSIWYG word processing, desktop publishing,
  327. and marketing presentations.  %@NL@%
  328.  
  329. Print devices and device fonts that adhere to the Windows standard will be
  330. automatically supported by Windows application software. The needs of many
  331. applications can be addressed by a single investment in a Windows device
  332. driver and a set of matching WYSIWYG screen fonts.  %@NL@%
  333.  
  334. A WYSIWYG screen representation of the document removes the limitations
  335. inherent in old-style composition packages, making typographic-quality
  336. output possible by the non-typographer. WYSIWYG capabilities were once
  337. available only to users of expensive, dedicated systems. Now, however, they
  338. are becoming possible, and even expected, on most mass-market personal
  339. computers.  %@NL@%
  340.  
  341. The shift from dedicated to mass-market personal computers has created
  342. opportunities for people, other than printer manufacturers, to provide the
  343. market with WYSIWYG screen fonts. The key is the development, acquisition,
  344. or licensing of efficient and reliable font-generation technology. With such
  345. technology, a retail font supplier could generate both printer and screen
  346. fonts in a wide variety of sizes quickly and inexpensively. Third parties
  347. who wish to provide screen fonts to match a particular printer's fonts
  348. should work closely with the printer manufacturer to ensure screen and
  349. printer font fidelity.  %@NL@%
  350.  
  351. Font distributors who can provide both printer and matching screen fonts in
  352. the %@AI@%same%@AE@% retail package will be in an advantageous position in a marketplace
  353. where the majority of font suppliers provide only printer fonts.  %@NL@%
  354.  
  355.  
  356. %@2@%%@CR:C6A00070002 @%%@AB@%Windows Font Requirements%@AE@%%@EH@%%@NL@%
  357.  
  358. Regardless of how the vendor distributes fonts, the Windows environment must
  359. ultimately receive the following items for each font.  %@NL@%
  360.  
  361. For downloadable fonts:  %@NL@%
  362.  
  363.  
  364.   ■   An appropriate aspect-ratio, bitmap, screen font file in Windows .FON
  365.       file format usable by Windows GDI%@NL@%
  366.  
  367.   ■   The printer download file in printer-specific format%@NL@%
  368.  
  369.   ■   A printer font metrics file in Windows .PFM file format usable by the
  370.       printer's Windows printer driver%@NL@%
  371.  
  372.  
  373. For cartridges:  %@NL@%
  374.  
  375.  
  376.   ■   The font .FON file%@NL@%
  377.  
  378.   ■   A printer cartridge metrics (.PCM) file, containing .PFM file
  379.       definitions for each font, that can be used by both the PCL/HP
  380.       LaserJet and HP LaserJet III printer drivers.%@NL@%
  381.  
  382.   ■   A font cartridge%@NL@%
  383.  
  384.  
  385. You must update the Windows initialization file, WIN.INI, to make the screen
  386. driver and printer driver aware of these fonts. Ideally, the printer driver
  387. will contain an installer that will read the font vendor's floppy disks and
  388. install these files. In the absence of such a utility, clear directions on
  389. how to copy files to the user's hard disk and how to add entries to WIN.INI
  390. are important. However, we encourage font suppliers to provide their own
  391. user-friendly installer as a way to add value to their offering. (Windows
  392. Control Panel can install screen fonts; only downloadable soft fonts, .PFM
  393. files, and cartridge .PCM files need to be installed by the driver.)  %@NL@%
  394.  
  395.  
  396. %@3@%%@CR:C6A00070003 @%%@AB@%Bitmap Screen Fonts%@AE@%%@EH@%%@NL@%
  397.  
  398. Printer fonts should be accompanied by bitmap screen fonts in the
  399. apppropriate aspect ratio. Minimally, we recommend you supply line sizes
  400. that match the frequently used graphic arts point sizes (i.e., 8, 9, 10, 12,
  401. 14, 18, and 24).  %@NL@%
  402.  
  403. You measure screen fonts in line sizes (dots or lines per inch) rather than
  404. typographic point sizes. Specific line sizes of the fonts may be different
  405. from their nominal point sizes.  %@NL@%
  406.  
  407. For more information on screen fonts, see Chapter 1, "Screen Fonts for
  408. Windows," and Chapter 12, "Installer Scenarios."  %@NL@%
  409.  
  410.  
  411. %@3@%%@CR:C6A00070004 @%%@AB@%Downloadable Fonts%@AE@%%@EH@%%@NL@%
  412.  
  413. Downloadable fonts are the most cost-effective way to distribute additional
  414. fonts for a printer device. This approach enables third-party vendors to
  415. create and/or distribute downloadable soft fonts for a device.  %@NL@%
  416.  
  417. Downloadable fonts also enable users to access a larger variety of fonts
  418. than could be held in their printer's memory. This is possible because the
  419. driver selectively downloads the fonts only when needed.  %@NL@%
  420.  
  421. Each downloadable font must have a font file in printer-specific format.
  422. This file is in the printer's font command language. For the Windows printer
  423. driver to download the file, it must know where the file resides on the
  424. user's hard disk. Chapter 2, "Printer Font Metrics (PFM) Files," describes
  425. the Windows font management mechanism.  %@NL@%
  426.  
  427.  
  428. %@3@%%@CR:C6A00070005 @%%@AB@%Printer Font Metrics Files%@AE@%%@EH@%%@NL@%
  429.  
  430. Each downloadable printer font needs a printer font metrics (PFM) file in
  431. the Windows .PFM file format. The Windows printer driver uses the
  432. information in the .PFM file to prepare the width and kerning tables used by
  433. the application during composition.  %@NL@%
  434.  
  435. A printer font metrics file shares a common header with a Windows screen
  436. font file. The differences between the screen font file and the printer font
  437. metrics file occur after the common header. For a description of the
  438. contents of .PFM files, see Chapter 2, "Printer Font Metrics (PFM) Files,"
  439. and, then, Chapter 4, ".PFM Files for PostScript Printers," and Chapter 5,
  440. ".PFM Files for PCL Printers," for specific descriptions of those .PFM
  441. files.  %@NL@%
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448. %@CR:C6A-Part 01 @%%@1@%%@AB@%PART I  Fonts%@AE@%%@EH@%%@NL@%
  449. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  450.  
  451. This first part discusses printer and screen font issues in the Microsoft
  452. Windows environment. It also includes detailed descriptions of .PFM and .PCM
  453. files, the PFM Editor tool, and the specific .PFM file formats for
  454. PostScript and PCL printers.  %@NL@%
  455.  
  456. This information forms the basis for understanding the technical notes
  457. provided in Part 2, "The PCL Driver," and Part 3, "The PostScript Driver."  %@NL@%
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464. %@CR:C6A00010001 @%%@1@%%@AB@%Chapter 1  Screen Fonts for Windows%@AE@%%@EH@%%@NL@%
  465. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  466.  
  467. This chapter presents the factors you should consider when creating screen
  468. fonts. We recommend that you provide at least two (although three would be
  469. better) sets of screen fonts for the important display classes. We also
  470. recommend a range of screen line sizes, taking into account the trade-off
  471. between performance and WYSIWYG quality.  %@NL@%
  472.  
  473. Microsoft Windows applications must compose text for the target output
  474. device and display an approximation of that output on the screen. To have a
  475. WYSIWYG display, the screen fonts must match the printer fonts. The more
  476. accurate the representation, the more WYSIWYG the display.  %@NL@%
  477.  
  478.  
  479. %@2@%%@CR:C6A00010002 @%%@AB@%1.1  The Aspect-Ratio Classes of Display Devices%@AE@%%@EH@%%@NL@%
  480.  
  481. Actual dots-per-inch resolution is not a factor in determining the class of
  482. the device; only the aspect ratio is used.  %@NL@%
  483.  
  484. Windows recognizes three aspect-ratio classes of display devices:  %@NL@%
  485.  
  486.  
  487.   ■   2:1%@NL@%
  488.  
  489.   ■   1.33:1 (4:3)%@NL@%
  490.  
  491.   ■   1:1%@NL@%
  492.  
  493.  
  494. These classes roughly correspond to:  %@NL@%
  495.  
  496.  
  497.   ■   The IBM Color Graphics Adapter (2:1)%@NL@%
  498.  
  499.   ■   The IBM Enhanced Graphics Adapter (4:3)%@NL@%
  500.  
  501.   ■   The IBM PS/2(R) MCGA, VGA, and 8514/a (1:1)%@NL@%
  502.  
  503.  
  504. If you pre-digitize the screen fonts, we suggest you distribute three sets
  505. of %@AI@%each%@AE@% font for the three aspect ratios. (Vendors wanting to distribute
  506. only two sets should exclude the 2:1 class, as it clearly represents old
  507. technology.)  %@NL@%
  508.  
  509.  
  510. %@2@%%@CR:C6A00010003 @%%@AB@%1.2  Translating Point Sizes into Line Sizes%@AE@%%@EH@%%@NL@%
  511.  
  512. Because of the variation in screen resolutions, screen font sizes are
  513. discussed in terms of screen line sizes, not typographic point sizes. Those
  514. familiar with the Macintosh(R) environment have become used to line sizes
  515. and point sizes being the same. This is %@AI@%not %@AE@%true in the PC environment.  %@NL@%
  516.  
  517. Windows defines a logical page size (that is, lines-per-inch) for each
  518. device it supports. When possible, this logical page size will closely match
  519. the physical size and aspect ratio of the device. Common screen
  520. lines-per-inch sizes are as follows:  %@NL@%
  521.  
  522.  
  523.   ■   For a 2:1 aspect ratio, 96:48 (IBM Color Graphics Adapter)%@NL@%
  524.  
  525.   ■   For a 1:1 aspect ratio, 96:96 (VGA), 108:108, 120:120 (8514/a), and
  526.       144:144%@NL@%
  527.  
  528.   ■   For a 4:3 aspect ratio, 96:72 (IBM Enhanced Graphics Adapter)%@NL@%
  529.  
  530.  
  531. The equation for relating point size to equivalent screen line size is as
  532. follows:  %@NL@%
  533.  
  534. Truncate the quotient on the right-hand side if the result is a fractional
  535. line size; it is always better to select a smaller size when an exact match
  536. is not possible.  %@NL@%
  537.  
  538.  
  539. %@2@%%@CR:C6A00010004 @%%@AB@%1.3  Choosing the Correct Range of Line Sizes%@AE@%%@EH@%%@NL@%
  540.  
  541. To represent accurately a printer font on the screen, you must make
  542. available a reasonable range of screen fonts. However, each screen font
  543. consumes valuable memory. Therefore, as a font vendor, you should weigh
  544. carefully performance against large screen-font variety. For each printer
  545. font, you should distribute at least two, and preferably three, .FON files
  546. containing screen fonts for the following:  %@NL@%
  547.  
  548.  
  549.   ■   1:1 aspect-ratio screens%@NL@%
  550.  
  551.   ■   4:3 aspect-ratio screens%@NL@%
  552.  
  553.   ■   2:1 aspect-ratio screens (optional)%@NL@%
  554.  
  555.  
  556. The most important factor to consider when creating screen-font files is
  557. memory consumption. Fewer and smaller screen fonts use less memory, but may
  558. degrade the WYSIWYG quality of the display. Other factors to consider
  559. include the following:  %@NL@%
  560.  
  561.  
  562.   ■   Legibility threshold. There is a certain size at which the fonts are
  563.       difficult, if not impossible, to read. For most screens, the value is
  564.       6 lines. For high-resolution screens, the value is around 9-10 lines.
  565.       Therefore, it does not make sense to provide fonts below these sizes.%@NL@%
  566.  
  567.   ■   Doubling and tripling. The screen driver may double or triple a
  568.       small-size font to take the place of an unavailable large font. For
  569.       example, it may double an 18-line font to make a 36-line font, or it
  570.       may triple a 24-line font to make a 72-line font. Doubling is ugly,
  571.       but acceptable and difficult to avoid. Tripling is unacceptable and
  572.       can be avoided by providing a well-chosen range of screen line sizes.%@NL@%
  573.  
  574.   ■   Specific applications. The application can control how the screen
  575.       driver will select a font for such things as text greeking, doubling
  576.       and tripling, vector font substitution, and down-sizing to match
  577.       widths.
  578. %@NL@%
  579.  
  580.  
  581.  
  582. %@3@%%@CR:C6A00010005 @%%@AB@%1.3.1  Greeking%@AE@%%@EH@%%@NL@%
  583.  
  584. Some applications stop displaying screen fonts below a certain line size and
  585. may display a gray shaded box or other graphic representation. This is
  586. referred to as "greeked" text. Greeking speeds up the screen display.  %@NL@%
  587.  
  588.  
  589. %@3@%%@CR:C6A00010006 @%%@AB@%1.3.2  Proof Versus Draft (Doubling and Tripling) Quality%@AE@%%@EH@%%@NL@%
  590.  
  591. In Windows, %@AI@%proof%@AE@% usually means good and %@AI@%draft%@AE@% means poor but quick. The
  592. screen driver will never double- or triple-size a font for proof quality.
  593. However, it will double- or triple-size smaller fonts to get the exact size
  594. it wants for draft quality. If the correct size is available, the screen
  595. driver will always choose it.  %@NL@%
  596.  
  597. Doubling and tripling occur only when the exact size is not available. For
  598. example, assume the only screen sizes are 10 and 19 lines, and the
  599. application wants a 20-line screen font. In proof quality, the screen driver
  600. would choose the 19-line font. In draft quality, the screen driver would
  601. double the 10-line font.  %@NL@%
  602.  
  603.  
  604. %@3@%%@CR:C6A00010007 @%%@AB@%1.3.3  Vector Font Substitution%@AE@%%@EH@%%@NL@%
  605.  
  606. Vector outline fonts do not look as good as well-made raster screen fonts,
  607. but they look better than doubled or tripled screen fonts. Also, the amount
  608. of memory used by vector fonts is constant while the amount of memory used
  609. by raster fonts increases as the font size increases.  %@NL@%
  610.  
  611.  
  612. %@3@%%@CR:C6A00010008 @%%@AB@%1.3.4  Down-sizing to Match Widths%@AE@%%@EH@%%@NL@%
  613.  
  614. When the screen fonts do not accurately represent the printer fonts (i.e.,
  615. the height-to-width ratio on the printer font is different from that of the
  616. screen font), an application can ask for a smaller font to get the correct
  617. width. By doing this, the application can display the line more quickly and
  618. prevent the characters from overlapping.  %@NL@%
  619.  
  620. This behavior can most often be observed when the font vendor does not
  621. supply matching screen fonts, or the screen fonts do not contain the same
  622. height-to-width ratio as their corresponding printer fonts.  %@NL@%
  623.  
  624.  
  625. %@2@%%@CR:C6A00010009 @%%@AB@%1.4  Recommended Screen Font Sizes%@AE@%%@EH@%%@NL@%
  626.  
  627. Nothing produces better WYSIWYG than a wide range of screen font sizes. On
  628. the other hand, nothing degrades system performance faster than a large
  629. number of screen fonts. Therefore, the selection of screen fonts must
  630. balance desired WYSIWYG quality with system performance.  %@NL@%
  631.  
  632. Suppose, for example, you have two machines with different screen font
  633. configurations. Machine A contains the screen font sizes 7, 10, and 16
  634. lines. Machine B contains the sizes 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
  635. and 18 lines. If the user creates a page using all the fonts from Machine B,
  636. the differences in sizes will be visible. However, the machine will load 12
  637. screen fonts to display the page.  %@NL@%
  638.  
  639. On Machine A, with doubling and tripling disabled, the machine displays the
  640. same range of sizes as follows:  %@NL@%
  641.  
  642.  
  643.   ■   7, 8,  and 9 lines displayed with the 7-line font%@NL@%
  644.  
  645.   ■   10, 11, 12, 13, 14, and 15 lines displayed with the 10-line font%@NL@%
  646.  
  647.   ■   16, 17, and 18 lines displayed with the 16-line font%@NL@%
  648.  
  649.  
  650. Much of the WYSIWYG would be lost because several sizes are displayed with
  651. the same font. However, the machine had to load only three fonts to display
  652. the page.  %@NL@%
  653.  
  654. Thus, Machine B %@AI@%slowly%@AE@% displayed with high WYSIWYG quality, what Machine A
  655. %@AI@%quickly%@AE@% displayed with poor WYSIWYG quality.  %@NL@%
  656.  
  657. As the font vendor, you need to consider the application the user will run
  658. under Windows. For example, Windows Excel generally uses body-size fonts
  659. (fonts in the size range of 8 to 12 points). Therefore, a wide range of font
  660. sizes is unnecessary. And Aldus(R) PageMaker(R), although it uses a large
  661. range of sizes, switches to vector fonts above 24 lines (i.e., the default
  662. "Vector text above" setting).  %@NL@%
  663.  
  664. Ideally, the user should decide which is more important: WYSIWYG quality or
  665. performance. Many font products are available that allow for exactly that:
  666. the product contains a font generator that requires the user to specify
  667. which point sizes to build. For such programs, we recommend the user be
  668. given the option to select a pre-determined range of sizes:  %@NL@%
  669.  
  670.  
  671.   ■   "Publishing" size range of 8, 9, 10, 12, 14, 18, and 24 lines%@NL@%
  672.  
  673.   ■   "Artwork" size range of 7, 8, 9, 10, 11, 12, 14, 16, 18, 21, 24, 28,
  674.       and 32 lines%@NL@%
  675.  
  676.   ■   "General use" or "Performance" range of 8, 10, 12, 18, and 24 lines%@NL@%
  677.  
  678.  
  679. If the font-creation program requires the user to indicate exactly which
  680. sizes should be built (that is, there are no pre-determined ranges), then we
  681. recommend that the documentation provide specific instructions on what
  682. numbers to enter, based upon the user's needs or intended use for the
  683. product.  %@NL@%
  684.  
  685. For font packages that give the user no choice in the size range, we
  686. recommend that the vendor supply the "Publishing" size range of 8, 9, 10,
  687. 12, 14, 18, and 24 lines.  %@NL@%
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694. %@CR:C6A00020001 @%%@1@%%@AB@%Chapter 2  Printer Font Metrics (PFM) Files%@AE@%%@EH@%%@NL@%
  695. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  696.  
  697. This chapter presents the format for listing printer font metrics (PFM)
  698. files and soft fonts in the WIN.INI file, and the format for .PFM and .PCM
  699. files.  %@NL@%
  700.  
  701. Most drivers have the text metrics for a small number of device-resident
  702. fonts built in as resources. But the majority of the printer font metrics
  703. will be external to the driver in the form of Microsoft Windows printer font
  704. metrics files.  %@NL@%
  705.  
  706. The driver retrieves information about which fonts are available by reading
  707. profile strings from the Windows initialization file, WIN.INI. Drivers
  708. maintain their default settings across invocations of the driver by saving
  709. the information in WIN.INI.  %@NL@%
  710.  
  711.  
  712. %@2@%%@CR:C6A00020002 @%%@AB@%2.1  Listing .PFM Files in WIN.INI%@AE@%%@EH@%%@NL@%
  713.  
  714. Most of this discussion pertains to .PFM files for soft fonts (i.e., fonts
  715. that must be downloaded to the printer from the computer). However,
  716. cartridge and printer-resident fonts can be handled in the same manner.  %@NL@%
  717.  
  718. There are two forms of soft fonts:  %@NL@%
  719.  
  720.  
  721.   ■   Permanent soft fonts. These are copied from the computer to the
  722.       printer when the printer is first turned on and remain there until the
  723.       printer is turned off. The Windows printer driver has access to
  724.       permanent soft fonts for all the documents that it prints.%@NL@%
  725.  
  726.   ■   Temporary soft fonts. These are copied from the computer to the
  727.       printer on an as-needed basis during the print job. They are deleted
  728.       from the printer's memory at the end of a print job.%@NL@%
  729.  
  730.  
  731. For the Windows printer driver to correctly locate .PFM files, the driver,
  732. or a utility provided by the font vendor, must perform the following
  733. operations:  %@NL@%
  734.  
  735.  
  736.   ■   Transfer .PFM, screen font, and downloadable font files (i.e., soft
  737.       fonts) from the font manufacturer's floppy disks to the user's hard
  738.       disk.%@NL@%
  739.  
  740.   ■   Add the entries in the WIN.INI file using the format described in the
  741.       following sample listing of .PFM files:%@NL@%
  742.  
  743.  
  744. %@AS@%  [HPPCL,LPT1]
  745. %@AS@%  SoftFonts=4
  746. %@AS@%  SoftFont1=C:\PCLFONTS\HVPB0140.PFM
  747. %@AS@%  SoftFont2=C:\PCLFONTS\TRPR0120.PFM
  748. %@AS@%  SoftFont3=C:\PCLFONTS\TRPB0120.PFM,C:\PCLFONTS\TR120BPN.USP
  749. %@AS@%  SoftFont4=C:\PCLFONTS\TRPI0120.PFM,C:\PCLFONTS\TR120IPN.USP
  750. %@AS@%  Cartridge100=C:\PCLFONTS\MYCART.PCM%@AE@%
  751.  
  752. The Windows Printer Font Installer, used in conjunction with the PCL / HP
  753. LaserJet driver, also requires these entries for permanently downloaded
  754. fonts:  %@NL@%
  755.  
  756. %@AS@%  C:\PCLFONTS\HVPB0140.PFM=C:\PCLFONTS\HV140BPN.USP
  757. %@AS@%  C:\PCLFONTS\TRPR0120.PFM=C:\PCLFONTS\TR120BPN.USP%@AE@%
  758.  
  759. The WIN.INI entries in the preceding examples have these meanings:  %@NL@%
  760.  
  761. %@TH:  48  2932 02 34 44 @%
  762. WIN.INI entry                     Definition
  763. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  764. [HPPCL,LPT1]                      The driver stores all its information in a
  765.                                   special section in the WIN.INI file. The 
  766.                                   format for the heading is:
  767.  
  768.                                   [%@AI@%driver name%@AE@%,%@AI@%port name%@AE@%]
  769.  
  770.                                   This enables the driver to maintain 
  771.                                   different information for each printer 
  772.                                   port to which the driver is connected. For
  773.                                   example, the printer on LPT1 may be a 
  774.                                   standard LaserJet incapable of handling 
  775.                                   soft fonts while the printer on LPT2 may 
  776.                                   be a LaserJet Series II.
  777.  
  778. %@AB@%SoftFonts=%@AE@%                        The number of %@AB@%SoftFontn= %@AE@%entries.
  779.  
  780. %@AB@%SoftFontn=%@AE@%                        The first two entries list the soft fonts 
  781.                                   that the user indicated have been 
  782.                                   previously downloaded to the printer (that
  783.                                   is, permanently downloaded fonts). For 
  784.                                   these fonts, only a Windows printer font 
  785.                                   metrics (.PFM) file is referenced.
  786.  
  787.                                   These entries could also represent .PFM 
  788.                                   files for cartridge fonts. The driver 
  789.                                   detects cartridge fonts by the presence of
  790.                                   a printer escape in the .PFM file. This is
  791.                                   
  792.                                   described in Part 2, "The PCL Driver."
  793.  
  794.                                   The last two %@AB@%SoftFontn=%@AE@% fields list the 
  795.                                   fonts that the driver is to download 
  796.                                   dynamically (i.e., temporary fonts) if 
  797.                                   called for in the document. 
  798.  
  799. %@AB@%Cartridgen=%@AE@%%@AI@%%@AE@%                       The definition of a cartridge. A .PCM file
  800.                                   contains one PFM structure for each font 
  801.                                   in the cartridge.
  802.  
  803. %@AB@%PFM file=%@AE@%                         The Printer Font Installer in the PCL / HP
  804.                                   LaserJet driver uses these entries to 
  805.                                   preserve the filenames of the permanently 
  806.                                   downloaded fonts (first two %@AB@%SoftFontn=%@AE@% 
  807.                                   entries). The Printer Font Installer is 
  808.                                   described in Part 2, "The PCL Driver."
  809.  
  810. %@TE:  48  2932 02 34 44 @%
  811.  
  812. The %@AB@%SoftFonts=%@AE@% and%@AB@% SoftFontn=%@AE@% entries in the WIN.INI file may be entered by
  813. the user or, ideally, entered automatically by an installation utility. Some
  814. Windows drivers, such as the PCL / HP LaserJet driver, contain an
  815. installation utility.  %@NL@%
  816.  
  817. If the driver does not contain an installation utility, we recommend that
  818. the font vendor provide a utility that:  %@NL@%
  819.  
  820.  
  821.   ■   Transfers .PFM, screen font, and printer font files from the font
  822.       vendors' disks to the user's hard disk.%@NL@%
  823.  
  824.   ■   Writes the necessary changes to the WIN.INI file.%@NL@%
  825.  
  826.  
  827. If .PFM files are not supplied, the driver may elect to generate them from
  828. the download files. The PCL / HP LaserJet driver, for example, does this.
  829. However, the PCL driver's PFM generator does not create pair-kern tables or
  830. very accurate extended text metrics structures; only the font's designer can
  831. create these structures accurately. It also cannot expand compressed font
  832. files or decrypt encrypted files. In this case, the font vendor must supply
  833. an installer utility that will convert the font files into regular HP soft
  834. font files.  %@NL@%
  835.  
  836. The current Windows PostScript driver is not equipped with a soft font
  837. installation utility. Even if it were, it would not attempt to generate .PFM
  838. files from downloadable font files due to the complexity of PostScript
  839. fonts. Instead, it would build .PFM files from Adobe(tm) font metrics (.AFM)
  840. files. As a font vendor, you must supply the .PFM files to guarantee an
  841. accurate description of the font metrics. Optionally, you may supply .AFM
  842. files since a future driver may also read them.  %@NL@%
  843.  
  844.  
  845. %@2@%%@CR:C6A00020003 @%%@AB@%2.2  Printer Font Install Directory File%@AE@%%@EH@%%@NL@%
  846.  
  847. The printer font install directory file, FINSTALL.DIR, is a standard file
  848. format read by font install utilities. The purpose of this file is to link
  849. each downloadable font file to its corresponding .PFM and screen font file.
  850. The utility uses this file to locate the .PFM, screen, and printer font
  851. files on the disks in a distribution package. We recommend that font vendors
  852. use this file format when designing a font package for installation by the
  853. Windows Printer Font Installer.  %@NL@%
  854.  
  855. As of this writing, the printer font install directory file is supported
  856. only by the Printer Font Installer in the Windows PCL / HP LaserJet driver.
  857. The format for the file is documented in Part 2, "The PCL Driver."  %@NL@%
  858.  
  859.  
  860. %@2@%%@CR:C6A00020004 @%%@AB@%2.3  .PFM File Organization%@AE@%%@EH@%%@NL@%
  861.  
  862. The printer font metrics file consists of the following data structures (in
  863. this order):  %@NL@%
  864.  
  865.  
  866.   1.  .PFM header structure (PFMHEADER)%@NL@%
  867.  
  868.   2.  Array of character widths from %@AB@%dfFirstChar%@AE@% through%@AB@% dfLastChar%@AE@% plus one
  869.       WORD%@NL@%
  870.  
  871.   3.  .PFM extension structure (PFMEXTENSION)%@NL@%
  872.  
  873.   4.  Driver name pointed to by%@AB@% dfDevice%@AE@%%@NL@%
  874.  
  875.   5.  Windows font name pointed to by %@AB@%dfFace%@AE@%%@NL@%
  876.  
  877.   6.  Extended Text Metric structure (EXTTEXTMETRIC) pointed to by
  878.       %@AB@%dfExtMetricsOffset%@AE@%%@NL@%
  879.  
  880.   7.  Extent table pointed to by %@AB@%dfExtentTable%@AE@%%@NL@%
  881.  
  882.   8.  Driver-specific structure pointed to by%@AB@% dfDriverInfo%@AE@%%@NL@%
  883.  
  884.   9.  Pair-kern table pointed to by %@AB@%dfPairKernTable%@AE@%%@NL@%
  885.  
  886.   10. Track-kern table pointed to by %@AB@%dfTrackKernTable%@AE@%%@NL@%
  887.  
  888.  
  889. Of these structures, the .PFM header, .PFM extension, and font name must be
  890. present in every Windows .PFM file. The existence of the remaining
  891. structures depends upon the printer driver and the font vendor's
  892. preferences. The specific requirements for the Windows PostScript and PCL
  893. drivers are described in Chapter 4, ".PFM Files for PostScript Printers,"
  894. and Chapter 5, ".PFM Files for PCL Printers." The rest of this section
  895. describes the data structures in the .PFM file.  %@NL@%
  896.  
  897.  
  898. %@3@%%@CR:C6A00020005 @%%@AB@%2.3.1  PFM Header and Width Table%@AE@%%@EH@%%@NL@%
  899.  
  900. The header for the .PFM file begins with the same information stored in a
  901. Windows raster font file or vector font file (see the %@AI@%Microsoft Windows
  902. %@AI@%Device Driver Adaptation Guide%@AE@% for descriptions of those fields).  %@NL@%
  903.  
  904. The .PFM file header contains the following fields:  %@NL@%
  905.  
  906. %@AS@%  WORD  dfVersion
  907. %@AS@%  WORD  dfSize
  908. %@AS@%  char  dfCopyright[60]
  909. %@AS@%  WORD  dfType
  910. %@AS@%  WORD  dfPoints
  911. %@AS@%  WORD  dfVertRes
  912. %@AS@%  WORD  dfHorizRes
  913. %@AS@%  WORD  dfAscent
  914. %@AS@%  WORD  dfInternalLeading
  915. %@AS@%  WORD  dfExternalLeading
  916. %@AS@%  BYTE  dfItalic
  917. %@AS@%  BYTE  dfUnderline
  918. %@AS@%  BYTE  dfStrikeOut
  919. %@AS@%  WORD  dfWeight
  920. %@AS@%  BYTE  dfCharSet
  921. %@AS@%  WORD  dfPixWidth
  922. %@AS@%  WORD  dfPixHeight
  923. %@AS@%  BYTE  dfPitchAndFamily
  924. %@AS@%  WORD  dfAvgWidth
  925. %@AS@%  WORD  dfMaxWidth
  926. %@AS@%  BYTE  dfFirstChar
  927. %@AS@%  BYTE  dfLastChar
  928. %@AS@%  BYTE  dfDefaultChar
  929. %@AS@%  BYTE  dfBreakChar
  930. %@AS@%  WORD  dfWidthBytes
  931. %@AS@%  DWORD dfDevice
  932. %@AS@%  DWORD dfFace
  933. %@AS@%  DWORD dfBitsPointer
  934. %@AS@%  DWORD dfBitsOffset%@AE@%
  935.  
  936. The fields in PFMHEADER are identical to the fields for Windows screen font
  937. files, which are documented in the %@AI@%Microsoft Windows Device Driver
  938. %@AI@%Adaptation Guide%@AE@%.  %@NL@%
  939.  
  940. The width table is an array of %@AB@%dfLastChar - dfFirst%@AE@% + 2 WORDs. (The last
  941. extra entry is 0.) If present, it is placed between the PFMHEADER and
  942. PFMEXTENSION structures. There is a width table for variable-width PCL
  943. fonts, but none for PostScript .PFM files. See Chapters 4 and 5 for
  944. descriptions of driver-specific implementations.  %@NL@%
  945.  
  946. The width table is present only in .PFM files for variable-pitch PCL fonts.
  947. Fixed-pitch PCL fonts do not require width information beyond the width
  948. fields in the header; PostScript fonts use the extent table instead.  %@NL@%
  949.  
  950.  
  951. %@3@%%@CR:C6A00020006 @%%@AB@%2.3.2  PFMEXTENSION Data Structure%@AE@%%@EH@%%@NL@%
  952.  
  953. The PFMEXTENSION data structure is as follows:  %@NL@%
  954.  
  955. %@AS@%  WORD  dfSizeFields
  956. %@AS@%  DWORD dfExtMetricsOffset
  957. %@AS@%  DWORD dfExtentTable
  958. %@AS@%  DWORD dfOriginTable
  959. %@AS@%  DWORD dfPairKernTable
  960. %@AS@%  DWORD dfTrackKernTable
  961. %@AS@%  DWORD dfDriverInfo
  962. %@AS@%  DWORD dfReserved%@AE@%
  963.  
  964. The fields are defined as follows:  %@NL@%
  965.  
  966. %@TH:  54  3555 02 34 44 @%
  967. Field                             Description
  968. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  969. %@AB@%dfSizeFields%@AE@%                      The size in bytes of this structure.
  970.  
  971. %@AB@%dfExtMetricsOffset%@AE@%                The byte offset in the file to the 
  972.                                   EXTTEXTMETRIC structure for this font.
  973.  
  974. %@AB@%dfExtentTable%@AE@%                     The byte offset in the file to the extent 
  975.                                   table. The size of the table is %@AB@%dfLastChar%@AE@%
  976.                                   %@AB@%%@AE@%- %@AB@%dfFirstChar %@AE@%+ 1 WORD. The extent table 
  977.                                   contains the unscaled widths (in 1/1000's 
  978.                                   of an em) of the characters in the font. 
  979.                                   This table must be present in PostScript 
  980.                                   .PFM files (see Chapter 4, ".PFM Files for
  981.                                   PostScript Printers").
  982.  
  983. %@AB@%dfOriginTable%@AE@%                     The byte offset in the file to the table 
  984.                                   of character origins. The size of the 
  985.                                   table is %@AB@%dfLastChar - dfFirstChar %@AE@%+ 1 WORD.
  986.                                   For screen font files, this table gives 
  987.                                   the signed amount of left adjustment to 
  988.                                   add to the current position before drawing
  989.                                   the characters. Negative values indicate 
  990.                                   left movement; positive values indicate 
  991.                                   right movement. This should be NULL for 
  992.                                   printer font metrics files.
  993.  
  994. %@AB@%dfPairKernTable%@AE@%                   The byte offset in the file to the 
  995.                                   optional pair-kerning table. This should 
  996.                                   be NULL if no kerning pairs are defined 
  997.                                   for this font. The size of the table is 
  998.                                   given by the %@AB@%etmKernPairs %@AE@%member of the 
  999.                                   EXTTEXTMETRIC structure.
  1000.  
  1001. %@AB@%dfTrackKernTable%@AE@%                  The byte offset in the file to the 
  1002.                                   optional track-kerning table. This should 
  1003.                                   be NULL if no kerning tracks are defined 
  1004.                                   for this font. The size of the table is 
  1005.                                   given by the %@AB@%etmKernTracks %@AE@%member of the 
  1006.                                   EXTTEXTMETRIC structure.
  1007.  
  1008. %@AB@%dfDriverInfo%@AE@%                      The byte offset in the file to additional 
  1009.                                   driver-specific information. Each driver 
  1010.                                   writer is responsible for documenting the 
  1011.                                   format of the data pointed to by this 
  1012.                                   member. These formats will be made public 
  1013.                                   so that third parties that want to create 
  1014.                                   compatible printer font metrics files may 
  1015.                                   do so. For the Windows PostScript and PCL 
  1016.                                   drivers, these structures are described in
  1017.                                   Chapters 4 and 5.
  1018.  
  1019. %@AB@%dfReserved%@AE@%                        Reserved; must be NULL.
  1020.  
  1021. %@TE:  54  3555 02 34 44 @%
  1022.  
  1023.  
  1024. %@3@%%@CR:C6A00020007 @%%@AB@%2.3.3  EXTTEXTMETRIC Data Structure%@AE@%%@EH@%%@NL@%
  1025.  
  1026. The EXTTEXTMETRIC data structure contains the following fields:  %@NL@%
  1027.  
  1028. %@AS@%  typedef struc{
  1029. %@AS@%   short etmSize;
  1030. %@AS@%   short etmPointSize;
  1031. %@AS@%   short etmOrientation;
  1032. %@AS@%   short etmMasterHeight;
  1033. %@AS@%   short etmMinScale;
  1034. %@AS@%   short etmMaxScale;
  1035. %@AS@%   short etmMasterUnits;
  1036. %@AS@%   short etmCapHeight;
  1037. %@AS@%   short etmXHeight;
  1038. %@AS@%   short etmLowerCaseAscent;
  1039. %@AS@%   short etmUpperCaseDescent;
  1040. %@AS@%   short etmSlant;
  1041. %@AS@%   short etmSuperScript;
  1042. %@AS@%   short etmSubScript;
  1043. %@AS@%   short etmSuperScriptSize;
  1044. %@AS@%   short etmSubScriptSize;
  1045. %@AS@%   short etmUnderlineOffset;
  1046. %@AS@%   short etmUnderlineWidth;
  1047. %@AS@%   short etmDoubleUpperUnderlineOffset;
  1048. %@AS@%   short etmDoubleLowerUnderlineOffset;
  1049. %@AS@%   short etmDoubleUpperUnderlineWidth;
  1050. %@AS@%   short etmDoubleLowerUnderlineWidth;
  1051. %@AS@%   short etmStrikeOutOffset;
  1052. %@AS@%   short etmStrikeOutWidth;
  1053. %@AS@%   WORD  etmKernPairs;
  1054. %@AS@%   WORD  etmKernTracks;
  1055. %@AS@%   }EXTTEXTMETRIC;%@AE@%
  1056.  
  1057. The EXTTEXTMETRIC fields are described in the following table. All the
  1058. measurements are given in the specified units, regardless of the current
  1059. mapping mode of the display context.  %@NL@%
  1060.  
  1061. %@TH: 128  6707 02 23 53 @%
  1062. Field                  Definition
  1063. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1064. %@AB@%etmSize%@AE@%                The size of this structure in bytes. Future changes
  1065.                        to this structure will be additions to the existing
  1066.                        structure; the position and meaning of existing 
  1067.                        members will not change.
  1068.  
  1069. %@AB@%etmPointSize%@AE@%           The nominal point size of this font in twips 
  1070.                        (twentieths of a point). This is the intended 
  1071.                        graphic arts size of the font; the actual size may 
  1072.                        differ slightly depending on the resolution of the 
  1073.                        device.%@AI@%%@AE@%
  1074.  
  1075. %@AB@%etmOrientation%@AE@%         The font's orientation:
  1076.  
  1077.                        0 = Either orientation
  1078.                        1 = Portrait
  1079.                        2 = Landscape
  1080.  
  1081.                        This value refers to the ability of this font to be
  1082.                        imaged on a page of the given orientation. 
  1083.                        Landscape pages are those whose width (x-dimension)
  1084.                        is greater than their height (y-dimension).
  1085.  
  1086. %@AB@%etmMasterHeight%@AE@%        Specifies the font size in device units for which 
  1087.                        the values in this font's extent table are exact. 
  1088.                        This is described in detail in Section 2.3.4,"Font 
  1089.                        Scaling: etmMasterHeight and etmMasterUnits."
  1090.  
  1091. %@AB@%etmMinScale%@AE@%            Specified in device units, the minimum valid size 
  1092.                        for this font. That is:
  1093.  
  1094.  
  1095.  
  1096.                        Where: 
  1097.                        72 represents the number of points-per-inch.%@AB@%%@AE@%
  1098.                        %@AB@%dfVertRes%@AE@% contains the number of dots-per-inch. 
  1099.  
  1100. %@AB@%etmMaxScale %@AE@%           Specified in device units, the maximum valid size 
  1101.                        for this font. That is:
  1102.  
  1103.  
  1104.  
  1105.                        Where:
  1106.                         72 represents the number of points-per-inch. %@AB@%%@AE@%
  1107.                        %@AB@%dfVertRes%@AE@% contains the number of dots-per-inch.
  1108.  
  1109. %@AB@%etmMasterUnits%@AE@%         The integer number of units-per-em where an em 
  1110.                        equals%@AB@% etmMasterHeight%@AE@%. In other words, %@AB@%%@AE@%
  1111.                        %@AB@%etmMasterHeight %@AE@%expressed in font units rather than
  1112.                        device units. This is described in detail in 
  1113.                        Section 2.3.4, "Font Scaling: etmMasterHeight and 
  1114.                        etmMasterUnits."
  1115.  
  1116. %@AB@%etmCapHeight%@AE@%           The height in font units of uppercase characters in
  1117.                        the font. Typically, the height of the capital H.
  1118.  
  1119. %@AB@%etmXHeight%@AE@%             The height in font units of lowercase characters in
  1120.                        the font. Typically, the height of the lowercase x.
  1121.  
  1122. %@AB@%etmLowerCase-%@AE@%          The distance in font units that the ascender of 
  1123. %@AB@%Ascent%@AE@%                 lowercase letters extends above the baseline, 
  1124.                        typically specified for a lowercase d.
  1125.  
  1126. %@AB@%etmLowerCase-%@AE@%          The distance in font units that the descender of 
  1127. %@AB@%Descent%@AE@%                lowercase letters extends below the baseline, 
  1128.                        typically specified for a lowercase p.%@AI@%%@AE@%
  1129.  
  1130. %@AB@%etmSlant%@AE@%               The angle in tenths of degrees clockwise (to the 
  1131.                        right) from the upright version of the font 
  1132.                        (assuming this font is slanted or italicized).
  1133.  
  1134. %@AB@%etmSuperScript%@AE@%         The recommended amount in font units  to offset 
  1135.                        superscript characters from the baseline (see the 
  1136.                        discussion of font units in Section 2.3.4, "Font 
  1137.                        Scaling: etmMasterHeight. and etmMasterUnits"). 
  1138.                        This is typically a negative offset.
  1139.  
  1140. %@AB@%etmSubScript%@AE@%           The recommended amount in font units  to offset 
  1141.                        subscript characters from the baseline (see the 
  1142.                        discussion of font units in Section 2.3.4, "Font 
  1143.                        Scaling: etmMasterHeight and etmMasterUnits"). This
  1144.                        is typically a positive offset.
  1145.  
  1146. %@AB@%etmSuperScriptSize%@AE@%     The recommended size in font units of superscript 
  1147.                        characters for this font.
  1148.  
  1149. %@AB@%etmSubScriptSize%@AE@%       The recommended size in font units of subscript 
  1150.                        characters for this font.%@AI@%%@AE@%
  1151.  
  1152. %@AB@%etmUnderlineOffset%@AE@%     The offset in font units downward from the baseline
  1153.                        where the top of a single underline bar should 
  1154.                        appear.
  1155.  
  1156. %@AB@%etmUnderlineWidth%@AE@%      The thickness in font units of the underline bar.
  1157.  
  1158. %@AB@%etmDoubleUpper-%@AE@%        The offset in font units downward from the baseline
  1159. %@AB@%UnderlineOffset%@AE@%        where the top of the upper double underline bar 
  1160.                        should appear.
  1161.  
  1162. %@AB@%etmDoubleLower-%@AE@%        The offset in font units downward from the baseline
  1163. %@AB@%UnderlineOffset%@AE@%        where the top of the lower double underline bar 
  1164.                        should appear.
  1165.  
  1166. %@AB@%etmDoubleUpper-%@AE@%        The thickness in font units of the upper double
  1167. %@AB@%UnderlineWidth%@AE@%         underline bar.
  1168.  
  1169. %@AB@%etmDoubleLower-%@AE@%        The thickness in font units of the lower double 
  1170. %@AB@%UnderlineWidth%@AE@%         underline bar.
  1171.  
  1172. %@AB@%etmStrikeOutOffset%@AE@%     The offset in font units upward from the baseline 
  1173.                        where the top of a strike-out bar should appear.
  1174.  
  1175. %@AB@%etmStrikeOutWidth%@AE@%      The thickness in font units of the strike-out bar 
  1176.                        (see the discussion of font units in Section 2.3.4,
  1177.                        "Font Scaling: etmMasterHeight and etmMasterUnits").
  1178.  
  1179. %@AB@%etmKernPairs%@AE@%           The number of character kerning pairs defined for 
  1180.                        this font. You can use this value to calculate the 
  1181.                        size of the pair-kern table returned by the 
  1182.                        GETPAIRKERNTABLE escape. It will not be greater 
  1183.                        than 512 kern pairs.
  1184.  
  1185. %@AB@%etmKernTracks%@AE@%          The number of kerning tracks defined for this font.
  1186.                        You can use this value to calculate the size of the
  1187.                        track-kern table returned by the GETTRACKKERNTABLE 
  1188.                        escape. It will not be greater than 16 kern tracks.
  1189.  
  1190. %@TE: 128  6707 02 23 53 @%
  1191.  
  1192.  
  1193. %@3@%%@CR:C6A00020008 @%%@AB@%2.3.4  Font Scaling: etmMasterHeight and etmMasterUnits%@AE@%%@EH@%%@NL@%
  1194.  
  1195. This section describes how a driver uses the values %@AB@%etmMasterHeight%@AE@% and
  1196. %@AB@%etmMasterUnits%@AE@% to scale the character width values in the extent table. It
  1197. also describes how the mechanism %@AI@%should%@AE@% work; Chapters 4 and 5 describe how
  1198. each driver implements or intends to implement the mechanism.  %@NL@%
  1199.  
  1200. A driver allows two methods for measuring character widths:  %@NL@%
  1201.  
  1202.  
  1203.   ■   Device units or "pixels"%@NL@%
  1204.  
  1205.   ■   Font units%@NL@%
  1206.  
  1207.  
  1208. Device units are the number of dots in the physical device (dots-per-inch);
  1209. %@AB@%etmMasterHeight%@AE@% is expressed in device units. It may be converted to points
  1210. using the formula:  %@NL@%
  1211.  
  1212. Where: 72 represents the number of points-per-inch. %@AB@%dfVertRes%@AE@% contains the
  1213. number of dots-per-inch in device units.  %@NL@%
  1214.  
  1215. Font units may differ from device units as a convenience to the font vendor.
  1216. If the font is targeted for devices that differ in resolution, there
  1217. typically is no benefit from tying the resolution of the font to the
  1218. resolution of a particular printer. The vendor uses the units that are most
  1219. convenient for designing the font. For example, 1000 units-per-cell or em is
  1220. the Adobe standard for PostScript fonts; %@AB@%etmMasterUnits%@AE@% is expressed in font
  1221. units-per-em where an em equals %@AB@%etmMasterHeight%@AE@%.  %@NL@%
  1222.  
  1223. A number may be converted from device units to font units using the formula:
  1224. %@NL@%
  1225.  
  1226. The formula for the inverse operation is:  %@NL@%
  1227.  
  1228.  
  1229. %@4@%%@AB@%Determining Character Widths%@AE@%%@EH@%%@NL@%
  1230.  
  1231. The values in the extent table are the widths of the characters when the
  1232. font height equals %@AB@%etmMasterHeight%@AE@%. When the font height does not equal
  1233. %@AB@%etmMasterHeight%@AE@%, the driver must scale the values from the extent table
  1234. (always assume linear scaling fonts).  %@NL@%
  1235.  
  1236. The values in the extent table are in font units. The width of a character
  1237. for a particular font height may be computed by using the ratio of character
  1238. extent over %@AB@%etmMasterUnits%@AE@%. That is:  %@NL@%
  1239.  
  1240. By multiplying font height through the equation, we have the formula for
  1241. computing character width:  %@NL@%
  1242.  
  1243. Notice that character width takes on the units of font height. If the font
  1244. height is in device units, the resulting width will be in device units. If
  1245. the font height is in font units, the resulting width will be in font units.
  1246. %@NL@%
  1247.  
  1248. In its normal mode of operation, the driver simply plugs the font height
  1249. into the above equation to compute the character width. Font height is
  1250. normally in device units, so the resulting width is normally in device
  1251. units.  %@NL@%
  1252.  
  1253. For example, assume the device resolution is 300 dpi and the font units are
  1254. expressed as 1000 units-per-em. Assuming that %@AB@%etmMasterHeight%@AE@% represents a
  1255. 72-point font, the values would look like this:  %@NL@%
  1256.  
  1257. %@AB@%dfVertRes%@AE@% = 300  %@NL@%
  1258.  
  1259. %@AB@%etmMasterHeight%@AE@% = 300  %@NL@%
  1260.  
  1261. %@AB@%etmMasterUnits%@AE@% = 1000  %@NL@%
  1262.  
  1263. Furthermore, assume the value in the width table for a capital H is 500 font
  1264. units, or half the em height. Assume the height of the font for which you
  1265. want the character width is 12 points, or 50 device units. With relative
  1266. widths disabled, the character width would be computed using the first width
  1267. formula:  %@NL@%
  1268.  
  1269.  
  1270. %@4@%%@AB@%Using the ENABLERELATIVEWIDTHS Escape%@AE@%%@EH@%%@NL@%
  1271.  
  1272. When the application calls the ENABLERELATIVEWIDTHS escape, the driver
  1273. expects the application to request a font height in device units, but will
  1274. return the character width in font units. The application may want to obtain
  1275. widths in font units to alleviate any error that may result from rounding
  1276. widths to device units. It is the responsibility of the driver to correct
  1277. for this error when relative widths are disabled, but the application may
  1278. choose to enable relative widths and perform its own error correction.  %@NL@%
  1279.  
  1280. The driver converts the font height (in device units) to font units prior to
  1281. computing the character width. The resultant formula is:  %@NL@%
  1282.  
  1283. This formula was computed by replacing the "font height" from the first
  1284. formula for character width with the formula for converting a value from
  1285. device units to font units and, then, simplifying the equation.  %@NL@%
  1286.  
  1287. Using the same assumptions given in the previous subsection, you can now
  1288. work through some more examples. You know that the width of the character is
  1289. 25 device units (i.e., dots or pixels) or half the height of 50 device
  1290. units. With relative widths enabled, the character width would be computed
  1291. using the second width formula:  %@NL@%
  1292.  
  1293. The width of the character is 83.333 font units. The driver will round
  1294. non-integer results.  %@NL@%
  1295.  
  1296. To demonstrate that the width in font units is equivalent to the width in
  1297. device units, it can be converted to device units using the formula provided
  1298. in the previous subsection:  %@NL@%
  1299.  
  1300. As stated earlier, this section describes how %@AB@%etmMasterUnits %@AE@%and
  1301. %@AB@%etmMasterHeight %@AE@%should be used. Chapters 4 and 5 describe restrictions
  1302. imposed by the drivers.  %@NL@%
  1303.  
  1304.  
  1305. %@3@%%@CR:C6A00020009 @%%@AB@%2.3.5  KERNPAIR Data Structure%@AE@%%@EH@%%@NL@%
  1306.  
  1307. The KERNPAIR data structure contains the following fields:  %@NL@%
  1308.  
  1309. %@AS@%  typedef struc{
  1310. %@AS@%   union {
  1311. %@AS@%    BYTE each[2]; /* UNION: 'each' and 'both' share the */ 
  1312. %@AS@%      /*   same memory */
  1313. %@AS@%    WORD both;
  1314. %@AS@%    } kpPair;
  1315. %@AS@%   short   kpKernAmount;
  1316. %@AS@%   } KERNPAIR;%@AE@%
  1317.  
  1318. The KERNPAIR fields are described in the following table. All the
  1319. measurements are given in the font units of the device, regardless of the
  1320. current mapping mode of the display context.  %@NL@%
  1321.  
  1322. %@TH:  17   889 02 16 60 @%
  1323. Field           Description
  1324. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1325. %@AB@%kpPair.each[0]%@AE@%  The character code for the first character in the kerning 
  1326.                 pair.
  1327.  
  1328. %@AB@%kpPair.each[1]%@AE@%  The character code for the second character in the kerning
  1329.                 pair.
  1330.  
  1331. %@AB@%kpPair.both%@AE@%     A WORD type in which the first character of the kerning 
  1332.                 pair is in the low-order byte and the second character is 
  1333.                 in the high-order byte.
  1334.  
  1335. %@AB@%kpKern-%@AE@%         The signed amount that this pair will be kerned if they 
  1336. %@AB@%Amount%@AE@%          appear side by side in the same font and size. This value 
  1337.                 is typically negative since pair-kerning usually results 
  1338.                 in two characters being set more tightly than normal.
  1339.  
  1340. %@TE:  17   889 02 16 60 @%
  1341.  
  1342. The number of kern pairs is stored in the EXTTEXTMETRIC structure's %@AB@%
  1343. %@AB@%etmKernPairs%@AE@% field. The array of KERNPAIR structures returned by the
  1344. GETPAIRKERNTABLE escape must be sorted in increasing order by the
  1345. %@AB@%kpPair.both%@AE@% member (or in order of %@AB@%kpPair.each[1]%@AE@%, %@AB@%lpPair.each[0]%@AE@%. However,
  1346. an integer sort on %@AB@%kpPair.both %@AE@%is faster). This enables the application to
  1347. do a binary search on the kerning table.  %@NL@%
  1348.  
  1349.  
  1350. %@3@%%@CR:C6A00020010 @%%@AB@%2.3.6  KERNTRACK Data Structure%@AE@%%@EH@%%@NL@%
  1351.  
  1352. The KERNTRACK data structure contains the following fields:  %@NL@%
  1353.  
  1354. %@AS@%  typedef struc{
  1355. %@AS@%   short ktDegree;
  1356. %@AS@%   short ktMinSize;
  1357. %@AS@%   short ktMinAmount;
  1358. %@AS@%   short ktMaxSize;
  1359. %@AS@%   short ktMaxAmount;
  1360. %@AS@%   }KERNTRACK;%@AE@%
  1361.  
  1362. The KERNTRACK fields are described in the following table. All measurements
  1363. are given in font units of the currently selected font, regardless of the
  1364. current mapping mode of the display context.  %@NL@%
  1365.  
  1366. %@TH:  24  1438 02 34 44 @%
  1367. Field                             Definition
  1368. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1369. %@AB@%ktDegree%@AE@%                          A short integer value in which 
  1370.                                   increasingly negative values represent 
  1371.                                   tighter track-kerning and increasingly 
  1372.                                   positive values represent looser 
  1373.                                   track-kerning.
  1374.  
  1375. %@AB@%ktMinSize%@AE@%                         A short integer specifying in device units
  1376.                                   the minimum font size for which linear 
  1377.                                   track-kerning applies.
  1378.  
  1379. %@AB@%ktMinAmount%@AE@%                       A short integer specifying in font units 
  1380.                                   the amount of track-kerning to apply to 
  1381.                                   font sizes %@AB@%ktMinSize %@AE@%and below.
  1382.  
  1383. %@AB@%ktMaxSize%@AE@%                         A short integer specifying in device units
  1384.                                   the maximum font size for which linear 
  1385.                                   track-kerning applies.
  1386.  
  1387. %@AB@%ktMaxAmount%@AE@%                       A short integer specifying in font units 
  1388.                                   the amount of track-kerning to apply to 
  1389.                                   font sizes %@AB@%ktMaxSize %@AE@%and above.
  1390.  
  1391. %@TE:  24  1438 02 34 44 @%
  1392.  
  1393. Between the %@AB@%ktMinSize%@AE@% and %@AB@%ktMaxSize%@AE@% font sizes, track-kerning is a linear
  1394. function from %@AB@%ktMinAmount%@AE@% to %@AB@%ktMaxAmount%@AE@%.  %@NL@%
  1395.  
  1396.  
  1397. %@2@%%@CR:C6A00020011 @%%@AB@%2.4  Printer Cartridge Metrics (PCM) Files%@AE@%%@EH@%%@NL@%
  1398.  
  1399. A .PCM file consists of a global information header followed by a series of
  1400. .PFM file structures. The file structure is as follows:  %@NL@%
  1401.  
  1402. %@AS@%  struct _pcmheader {
  1403. %@AS@%   WORD pcmMagic;
  1404. %@AS@%   WORD pcmVersion;
  1405. %@AS@%   DWORD pcmSize;
  1406. %@AS@%   DWORD pcmTitle;
  1407. %@AS@%   DWORD pcmPFMList;
  1408. %@AS@%   }%@AE@%
  1409.  
  1410. The %@AB@%pcmMagic%@AE@% field must contain the magic number 3244 (0x0CAC). The Printer
  1411. Font Installer uses it to recognize .PCM files when no FINSTALL.DIR file is
  1412. supplied with the .PCM file.  %@NL@%
  1413.  
  1414. The %@AB@%pcmVersion%@AE@% field contains the version number of the .PCM file. The upper
  1415. byte contains the version number and the lower byte the revision number,
  1416. both in BCD. The current version number is 3.10, represented as 0x0310.  %@NL@%
  1417.  
  1418. The %@AB@%pcmSize%@AE@% field contains the size in bytes of the entire .PCM file.  %@NL@%
  1419.  
  1420. Following this structure is the title string for the cartridge. The file
  1421. offset of this string appears in the %@AB@%pcmTitle%@AE@% field of the header. This
  1422. string is terminated by zero. This title is used normally in the cartridge
  1423. list box in the Printer Setup (device-mode) dialog box. A non-zero offset
  1424. and a non-empty name string at that offset is required.  %@NL@%
  1425.  
  1426. The list of font PFMs is a collection of .PFM files (one for each cartridge
  1427. font) that are appended together. Each PFM contains (in a doubleword at
  1428. offset 2) the size of the .PFM file, which you can consider the offset of
  1429. the next PFM relative to the current one. All file positions in the PFM
  1430. itself are offsets from the file position of the beginning of the individual
  1431. PFM. The absolute file offset of the first PFM in the file is placed in the
  1432. %@AB@%pcmPFMList%@AE@% field. One .PFM file is required for each individual font in the
  1433. cartridge.  %@NL@%
  1434.  
  1435.  
  1436. %@3@%%@CR:C6A00020012 @%%@AB@%2.4.1  WIN.INI Additions%@AE@%%@EH@%%@NL@%
  1437.  
  1438. You should specify non-driver resident cartridges by adding to the WIN.INI
  1439. file in the driver section a switch similar to the following one:  %@NL@%
  1440.  
  1441. %@AS@%  [HPPCL, port]
  1442. %@AS@%  cartridgen=PCM-file%@AE@%
  1443.  
  1444. where the given .PCM file defines the cartridge with index %@AI@%n%@AE@%. You may use
  1445. this index with the %@AB@%cartindexn %@AE@%switch to select the cartridge. The index of
  1446. a cartridge must be at least 50 in version 3.2.  %@NL@%
  1447.  
  1448. The standard cartridges defined by the %@AB@%cartridge%@AE@%%@AI@%n%@AE@% switch are listed in the
  1449. Cartridge list box in the Printer Driver dialog box, and may be easily
  1450. selected and unselected.  %@NL@%
  1451.  
  1452.  
  1453. %@3@%%@CR:C6A00020013 @%%@AB@%2.4.2  Cartridge Installation%@AE@%%@EH@%%@NL@%
  1454.  
  1455. You install cartridges the same way as soft fonts by clicking the Fonts
  1456. button to invoke the Printer Font Installer. All the user-defined cartridges
  1457. that appear in the WIN.INI file are listed, along with the soft fonts, in
  1458. the Fonts list box. Cartridges are labeled with a "(c)" symbol or, if
  1459. running version 3.3 of the PCL driver, a bitmapped representation of a
  1460. cartridge.  %@NL@%
  1461.  
  1462. You can also add new cartridges the same way as fonts by clicking the Add
  1463. Fonts... button and selecting a source from which to read. There are two
  1464. ways to find cartridges. You can either specify them in the FINSTALL.DIR
  1465. file or scan the disk. The syntax for specifying cartridges in FINSTALL.DIR
  1466. is given in the next subsection. If no FINSTALL.DIR file is found on the
  1467. source disk, the scanning process will search for files in the PCM format
  1468. (i.e., containing valid %@AB@%pcmMagic%@AE@% and %@AB@%pcmVersion%@AE@% fields and a valid title)
  1469. and place those it finds in the install list box along with any downloadable
  1470. fonts it finds.  %@NL@%
  1471.  
  1472. You manipulate cartridges basically the same way you would manipulate soft
  1473. fonts. You can add, delete, copy, and/or move them between ports. However,
  1474. the Edit button and the Permanent and Temporary radio buttons are disabled
  1475. if any cartridges are selected since these operations do not apply to
  1476. cartridges.  %@NL@%
  1477.  
  1478.  
  1479. %@3@%%@CR:C6A00020014 @%%@AB@%2.4.3  FINSTALL.DIR Syntax%@AE@%%@EH@%%@NL@%
  1480.  
  1481. A new structure for installing cartridges has been added to the FINSTALL.DIR
  1482. syntax. The syntax is as follows:  %@NL@%
  1483.  
  1484. %@AS@%  CARTRIDGE {
  1485. %@AS@%   aspectratio = description, screenfontfile
  1486. %@AS@%   .
  1487. %@AS@%   .
  1488. %@AS@%   .
  1489. %@AS@%   "cartridge title" = cartridgefile
  1490. %@AS@%   .
  1491. %@AS@%   .
  1492. %@AS@%   .
  1493. %@AS@%   }%@AE@%
  1494.  
  1495. This syntax enables you to install matching screen fonts along with a
  1496. cartridge. More than one cartridge may appear in a CARTRIDGE block. The
  1497. %@AB@%cartridge title%@AE@% field is the name of the cartridge placed in the list box at
  1498. installation time. It should, but does not need to, match the title in the
  1499. .PCM file. For more information on the FINSTALL.DIR file, see Part 2, "The
  1500. PCL Driver."  %@NL@%
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507. %@CR:C6A00030001 @%%@1@%%@AB@%Chapter 3  The PFM Editor%@AE@%%@EH@%%@NL@%
  1508. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1509.  
  1510. One of the responsibilities of a Microsoft Windows printer driver is to
  1511. provide a list of the fonts available on the printer. Because of the large
  1512. number of downloadable and cartridge fonts available for HP LaserJet
  1513. printers, the driver can only have a few of these fonts built into it.  %@NL@%
  1514.  
  1515. The driver supports the installation of additional fonts by supplying a
  1516. utility called the Printer Font Installer. (See Part 2, "The PCL Driver,"
  1517. for a description of this utility.) The Printer Font Installer, in the PCL
  1518. driver, requires one .PFM file per-font per-size, with an additional .PFM
  1519. file if there is a font variation such as an italic font or a font with a
  1520. different weight. Thus, a font cartridge containing Helv and TmsRmn fonts at
  1521. 8, 10, 12, and 14 points will require eight .PFM files. If the cartridge
  1522. also contains boldface and italic versions of the 10 and 12 point fonts, an
  1523. additional eight .PFM files are required. These individual cartridge font
  1524. .PFM files are then combined into a single .PCM file.  %@NL@%
  1525.  
  1526. The information Windows requires about each font includes identifying
  1527. information such as the face name, family, and point size; size information
  1528. such as heights, extents, leading, and widths of individual characters;
  1529. information on how to synthesize effects such as underlining and strikeout;
  1530. and hardware information such as the amount of printer memory required (for
  1531. downloadable fonts) and the printer escape string used to select the font.  %@NL@%
  1532.  
  1533. The font supplier generally provides .PFM files on the soft font disks or a
  1534. .PCM file on a disk with the cartridge. The font supplier may optionally
  1535. supply matching WYSIWYG screen fonts, which greatly enhance the usability of
  1536. the fonts with Windows applications.  %@NL@%
  1537.  
  1538. The PFM Editor is a Windows application that the supplier can use to create
  1539. and edit .PFM files and create .PCM files for the PCL driver. The PFM Editor
  1540. simplifies and accelerates the task of creating .PFM files by not requiring
  1541. a great deal of knowledge about either the .PFM file format or Windows
  1542. device drivers.  %@NL@%
  1543.  
  1544. The PFM Editor reads the filename of a .PFM file from the command line if it
  1545. is passed one. Thus, defining the .PFM extension in WIN.INI allows the user
  1546. to double-click .PFM files to edit them.  %@NL@%
  1547.  
  1548.  
  1549. %@2@%%@CR:C6A00030002 @%%@AB@%3.1  The Main Window%@AE@%%@EH@%%@NL@%
  1550.  
  1551. The main window of the PFM Editor contains several fields that give general
  1552. identifying information about the font. All of these fields appear in the
  1553. PFM header structure, which is identical to a font file header. Details of
  1554. the field definitions appear in the %@AI@%Microsoft Windows Device Driver
  1555. %@AI@%Adaptation Guide%@AE@%. You should always specify at least the %@AB@%Pitch%@AE@% field before
  1556. selecting any of the metrics or tables dialogs described in the following
  1557. subsections.  %@NL@%
  1558.  
  1559. The fields appearing in the main window are as follows:  %@NL@%
  1560.  
  1561. %@TH:  42  2523 02 34 44 @%
  1562. Field                             Description
  1563. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1564. %@AB@%Face Name%@AE@%                         The face name of the font such as Courier.
  1565.  
  1566. %@AB@%Char Set%@AE@%                          The character set that the font represents.
  1567.                                   The most common values are 0 for Windows 
  1568.                                   ANSI and 255 for the OEM character set.
  1569.  
  1570.                                   In Part 2, "The PCL Driver," additional 
  1571.                                   character sets for the PCL driver are 
  1572.                                   defined in Section 11.4.1, "PFM Header," 
  1573.                                   as follows: 180 = Math-8; 181 = PI Font; 
  1574.                                   182 = LineDraw; 183 = PC Line; 184 = Tax 
  1575.                                   Line, and 185 = US Legal.
  1576.  
  1577. %@AB@%Pitch%@AE@%                             Two radio buttons: Fixed and Proportional.
  1578.  
  1579. %@AB@%Effects%@AE@%                           Three options indicating the appearance of
  1580.                                   the font: Italic, Underline, Strikeout.
  1581.  
  1582. %@AB@%Font Family%@AE@%                       Six selections: Don't Care, Roman, Swiss, 
  1583.                                   Modern, Script, and Decorative. The driver
  1584.                                   uses the family to classify fonts for 
  1585.                                   identification and selection purposes. The
  1586.                                   terms are documented in the %@AI@%Microsoft %@AE@%
  1587.                                   %@AI@%Windows %@AE@%
  1588.                                   %@AI@%Device Driver Adaptation Guide%@AE@%.
  1589.  
  1590. %@AB@%Points%@AE@%                            The point size of a font, or its height in
  1591.                                   units of 1/72 of an inch.
  1592.  
  1593. %@AB@%Weight%@AE@%                            The weight of the font ─ a number from 0 
  1594.                                   to 1000. 400 represents a normal, medium 
  1595.                                   font. Larger numbers represent heavier 
  1596.                                   (bolder) fonts. A more exact 
  1597.                                   correspondence appears in Part 2, "The PCL
  1598.                                   Driver," under Section 11.4.1, "PFM 
  1599.                                   Header."
  1600.  
  1601. %@AB@%Copyright%@AE@%                         A 60-character string containing the font 
  1602.                                   supplier's copyright notice.
  1603.  
  1604. %@TE:  42  2523 02 34 44 @%
  1605.  
  1606.  
  1607. %@2@%%@CR:C6A00030003 @%%@AB@%3.2  The File Menu%@AE@%%@EH@%%@NL@%
  1608.  
  1609. The File menu contains all the standard Windows File menu items along with
  1610. one extra item: Create PCM File... . The following is a list with
  1611. descriptions of those items:  %@NL@%
  1612.  
  1613. %@TH:  26  1335 02 34 44 @%
  1614. Item                              Description
  1615. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1616. New                               Causes the PFM Editor to re-initialize 
  1617.                                   itself and display an empty, untitled .PFM
  1618.                                   file.
  1619.  
  1620. Open...                           Displays a standard Open File Name dialog 
  1621.                                   box. .PFM is the default file extension.
  1622.  
  1623. Save                              Saves the .PFM file with the same name as 
  1624.                                   previously used in a Load or Save 
  1625.                                   operation. If the file is untitled, the 
  1626.                                   Save As... dialog appears.
  1627.  
  1628. Save As...                        Allows the user to specify a filename 
  1629.                                   before saving.
  1630.  
  1631. Create PCM File..                 Allows the user to create a cartridge 
  1632.                                   metrics file for the HPPCL driver. For a 
  1633.                                   more detailed description, see Section 3.6,
  1634.                                   "Creating .PCM Files."
  1635.  
  1636. Exit                              Exits the PFM Editor.
  1637.  
  1638. About...                          Displays an informational dialog box.
  1639.  
  1640. %@TE:  26  1335 02 34 44 @%
  1641.  
  1642. As with all applications, the user is given the opportunity to save or
  1643. cancel if New, Open, or Exit is invoked when the current file has been saved
  1644. but not changed.  %@NL@%
  1645.  
  1646.  
  1647. %@2@%%@CR:C6A00030004 @%%@AB@%3.3  The Metrics Menu%@AE@%%@EH@%%@NL@%
  1648.  
  1649. This menu allows you to activate dialog boxes to specify dimensional
  1650. information about the font. The Metrics popup menu contains three
  1651. selections: Basics..., Extended..., and Effects... .  %@NL@%
  1652.  
  1653. Basic metrics includes information about character range heights and such
  1654. things as average widths, device resolution, and leading.  %@NL@%
  1655.  
  1656. Extended metrics is detailed information about the geometry of the font,
  1657. including such things as baseline, ascents/descents, orientation, scale,
  1658. etc.  %@NL@%
  1659.  
  1660. Effects metrics is information about how to synthesize effects such as
  1661. underlining and strikeout. To get to this menu, though, you must first go
  1662. through the Extended Metrics dialog box.  %@NL@%
  1663.  
  1664.  
  1665. %@3@%%@CR:C6A00030005 @%%@AB@%3.3.1  The Basic Metrics Dialog Box%@AE@%%@EH@%%@NL@%
  1666.  
  1667. You access this dialog by choosing Basics... from the Metrics menu. It
  1668. contains information about font size. The dialog box fields are as follows:
  1669. %@NL@%
  1670.  
  1671. %@TH:  66  3235 02 24 52 @%
  1672. Field                   Description
  1673. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1674. %@AB@%Characters:%@AE@%
  1675.  
  1676. %@AI@%First%@AE@%                   The first character in the character set. This is 
  1677.                         the numeric character code of the first character 
  1678.                         for which the font contains a printable character.
  1679.  
  1680. %@AI@%Last%@AE@%                    The last character in the character set. This is 
  1681.                         usually 127 for a 7-bit character set or 255 for 
  1682.                         an 8-bit character set.
  1683.  
  1684. %@AI@%Default%@AE@%                 The code of the character printed if the driver is
  1685.                         asked to print a character that falls outside the 
  1686.                         range First through Last.
  1687.  
  1688. %@AI@%Break%@AE@%                   The character that delimits words in word wrapping.
  1689.                         If an application or the %@AB@%DrawText()%@AE@% function is 
  1690.                         asked to word wrap a string in a box, it will 
  1691.                         break the word into multiple lines only at break 
  1692.                         character positions. This is generally the space 
  1693.                         character (32 in both ANSI and ASCII).
  1694.  
  1695. %@AB@%Leading: %@AE@%
  1696.  
  1697. %@AI@%Internal%@AE@%                The leading that appears within the height 
  1698.                         specified by the height of the font. Diacritical 
  1699.                         marks appear in this space.
  1700.  
  1701. %@AI@%External%@AE@%                The recommended additional space to insert between
  1702.                         lines. This space is not already accounted for in 
  1703.                         the height of the font.
  1704.  
  1705. %@AB@%Resolution: %@AE@%
  1706.  
  1707. %@AI@%Horizontal%@AE@%              The number of dots-per-inch at which the font was 
  1708. and %@AI@%Vertical%@AE@%            digitized. For an HP LaserJet, for example, both 
  1709.                         of these numbers should be 300.
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715. %@AB@%Widths: %@AE@%
  1716.  
  1717. %@AI@%Average%@AE@%                 For proportional space fonts, the average width of
  1718.                         all the characters in the font. This field is 
  1719.                         relabeled All for fixed- pitch fonts, since all 
  1720.                         fixed-pitch characters have the same width. It is 
  1721.                         represented in font units. The PFM Editor does not
  1722.                         calculate the average width from the width table; 
  1723.                         it must be explicitly entered. It is generally the
  1724.                         width of the lowercase x.
  1725.  
  1726. %@AI@%Maximum%@AE@%                 The width in font units of the widest character in
  1727.                         the font. Again, this is not calculated from the 
  1728.                         user width table. For fixed-pitch fonts, this 
  1729.                         field is not used and is disabled.
  1730.  
  1731. %@AB@%Height%@AE@%                  The height in font units of the character cell, 
  1732.                         including internal leading.
  1733.  
  1734. %@AB@%Ascent%@AE@%                  The ascent in font units of the font. The distance
  1735.                         from the top of the character cell to the baseline
  1736.                         of the font.
  1737.  
  1738. %@TE:  66  3235 02 24 52 @%
  1739.  
  1740. With the exception of the width table for proportional fonts, this dialog
  1741. fills in the remainder of the Microsoft-defined font file header. The field
  1742. definitions are from the %@AI@%Microsoft Windows Device Driver Adaptation Guide%@AE@%.
  1743. If the .PFM file is to be of any use, all of these fields must be specified
  1744. accurately.  %@NL@%
  1745.  
  1746. There are also two pushbuttons: OK, which causes the changes to be committed
  1747. into the .PFM file, and Cancel, which rolls the .PFM file back to the state
  1748. in which it was when the user invoked the menu selection.  %@NL@%
  1749.  
  1750.  
  1751. %@3@%%@CR:C6A00030006 @%%@AB@%3.3.2  The Extended Metrics Dialog Box%@AE@%%@EH@%%@NL@%
  1752.  
  1753. The extended font metrics are a more detailed description of the font's
  1754. geometry. The major fields are as follows:  %@NL@%
  1755.  
  1756. %@TH:  50  2622 02 34 44 @%
  1757. Field                             Description
  1758. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1759. %@AB@%Lower Case: %@AE@%
  1760.  
  1761. %@AI@%Ascent%@AE@%                            The distance in font units from the 
  1762.                                   baseline to the top of lowercase ascenders,
  1763.                                   typically measured from the lowercase d.
  1764.  
  1765. %@AI@%Descent%@AE@%                           The distance in font units from the 
  1766.                                   baseline to the bottom of descenders, 
  1767.                                   usually specified for lowercase p.
  1768.  
  1769. %@AB@%Point Size%@AE@%                        The intended size of the font in twips 
  1770.                                   (1/20th of a point, or 1/1440 of an inch).
  1771.  
  1772. %@AB@%Cap Height%@AE@%                        The height in font units of the font's 
  1773.                                   uppercase characters, usually taken for 
  1774.                                   the character H.
  1775.  
  1776. %@AB@%X Height%@AE@%                          The height in font units of lowercase 
  1777.                                   characters, usually the height of the 
  1778.                                   lowercase x.
  1779.  
  1780. %@AB@%Slant%@AE@%                             The angle in tenths of a degree clockwise 
  1781.                                   from the 
  1782.                                   vertical.
  1783.  
  1784. %@AB@%Master Height%@AE@%                     The size in device units at which the 
  1785.                                   values in the extent table are exact.
  1786.  
  1787. %@AB@%Master Units%@AE@%                      The Master Height field expressed in font 
  1788.                                   units. If the two are different, then the 
  1789.                                   device is a linear scaling de-
  1790.                                   vice and the application needs to scale 
  1791.                                   all values by the ratio of the requested 
  1792.                                   size to this value. (See Section 2.3.4, 
  1793.                                   "Font Scaling: etmMasterHeight and 
  1794.                                   etmMasterUnits," for a detailed 
  1795.                                   description of these two fields.)
  1796.  
  1797. %@AB@%Scale%@AE@%: 
  1798.  
  1799. %@AI@%Min%@AE@% and %@AI@%Max%@AE@%                       The minimum and maximum sizes to which a 
  1800.                                   linear scaling device can scale a font.
  1801.  
  1802. %@AB@%Orientation%@AE@%: 
  1803.  
  1804. %@AI@%Portrait%@AE@% and %@AI@%Landscape%@AE@%            Specify the orientation of the font, which
  1805.                                   may be either or both.
  1806.  
  1807. %@TE:  50  2622 02 34 44 @%
  1808.  
  1809. The Master Height, Master Units, and Min and Max Scale fields are used on
  1810. devices that can scale fonts linearly to any size. On devices that do not
  1811. scale fonts, these numbers should all be equal to the value in the Height
  1812. field from the Basic Metrics dialog box.  %@NL@%
  1813.  
  1814. All these fields come from the EXTTEXTMETRIC structure, which was defined in
  1815. Section 2.3.3, "EXTTEXTMETRIC Data Structure."  %@NL@%
  1816.  
  1817.  
  1818. %@3@%%@CR:C6A00030007 @%%@AB@%3.3.3  The Effects Metrics Dialog Box%@AE@%%@EH@%%@NL@%
  1819.  
  1820. This menu item is disabled (gray) until you specify the extended metrics.
  1821. The information you can then specify in this dialog box tells the driver how
  1822. to synthesize effects such as underlining and superscripting while allowing
  1823. for the per-font, per-size customization of these effects. It also forms the
  1824. remainder of the EXTTEXTMETRIC structure in the .PFM file.  %@NL@%
  1825.  
  1826. The effects of interest are superscripting, subscripting, underlining,
  1827. double underlining, and strikethroughs. Two numbers are required: the
  1828. vertical position of the effect and its size. Offsets are measured downward
  1829. from the baseline of the font, which means that strikeouts and superscripts
  1830. will generally have negative offsets. The size specifies the thickness of
  1831. lines in font units for the line effects, or the height in font units for
  1832. super- and subscripts. For double underlines, you may specify the upper and
  1833. lower lines independently.  %@NL@%
  1834.  
  1835.  
  1836. %@2@%%@CR:C6A00030008 @%%@AB@%3.4  The Tables Menu%@AE@%%@EH@%%@NL@%
  1837.  
  1838. This popup menu contains three selections: Widths..., Kerning Pairs..., and
  1839. Kerning Track... . Since these are only appropriate for proportional-width
  1840. fonts, they are grayed for fixed-pitch fonts.  %@NL@%
  1841.  
  1842. The width table contains the exact specification, per-character, of the
  1843. widths of characters in proportional fonts. Track- and pair-kerning are used
  1844. to fine tune character spacing.  %@NL@%
  1845.  
  1846.  
  1847. %@3@%%@CR:C6A00030009 @%%@AB@%3.4.1  The Width Table Dialog Box%@AE@%%@EH@%%@NL@%
  1848.  
  1849. The Width Table dialog box has a scrollable list box containing all the
  1850. characters and their widths, represented by decimal numbers in font units.
  1851. Notice that, since this table is an absolute requirement for all
  1852. proportional fonts, you must set the font pitch to proportional and the
  1853. first and last characters in the Basics... dialog box before entering a
  1854. width table.  %@NL@%
  1855.  
  1856. Just above the list box is a label number with an edit control next to it.
  1857. Whenever a character is selected from the list box, the label changes to the
  1858. character's code, and the edit control is changed to its width. The width
  1859. can then be changed.  %@NL@%
  1860.  
  1861. To commit the width change to the width table in the listbox, you must click
  1862. on the Width pushbutton. Since Width is the default button in this dialog
  1863. box, you can also just press ENTER after working in the edit control box. If
  1864. the character is not the last one in the font, clicking on Width or pressing
  1865. ENTER also causes the selection to be advanced to the next character, which
  1866. enables you to enter quickly the entire width table.  %@NL@%
  1867.  
  1868.  
  1869. %@3@%%@CR:C6A00030010 @%%@AB@%3.4.2  The Pair Kerning Table Dialog Box%@AE@%%@EH@%%@NL@%
  1870.  
  1871. You can fine tune character spacing for proportional fonts by using
  1872. pair-kerning. The Pair Kerning Table dialog box consists of a list box
  1873. containing character pairs and the amount of space to insert or delete
  1874. between them. A negative kern amount (given in font units) specifies tighter
  1875. spacing, while a positive amount spreads characters out.  %@NL@%
  1876.  
  1877. The three edit controls are for the From and To characters and the kerning
  1878. amount. If you select a kern pair in the list box, the editor displays for
  1879. modification the values in the structure.  %@NL@%
  1880.  
  1881. There are three buttons for manipulating the Pair Kerning Table:  %@NL@%
  1882.  
  1883.  
  1884.   ■   Add, which adds to the table the kern pair in the edit controls.%@NL@%
  1885.  
  1886.   ■   Delete, which removes from the list box the selected kern pair.%@NL@%
  1887.  
  1888.   ■   Change, which replaces the selected kern pair with the contents of the
  1889.       edit control.%@NL@%
  1890.  
  1891.  
  1892. Notice that the Pair Kerning Table is sorted; adding or replacing a pair
  1893. does not give it a particular position in the table.  %@NL@%
  1894.  
  1895. As in the other dialog boxes, the OK button causes the table to be committed
  1896. to the .PFM file, and the Cancel button will end the dialog without saving
  1897. the changes to the table.  %@NL@%
  1898.  
  1899.  
  1900. %@3@%%@CR:C6A00030011 @%%@AB@%3.4.3  The Track Kerning Table Dialog Box%@AE@%%@EH@%%@NL@%
  1901.  
  1902. You enter values into the Track Kerning Table in the same manner as for the
  1903. Pair Kerning Table. There are five fields to consider.  %@NL@%
  1904.  
  1905. For the kerning degree, negative values specify tighter kerning, and
  1906. positive values specify looser kerning. The minimum size specifies the
  1907. smallest size in font units for which track-kerning applies, and the maximum
  1908. size specifies the largest font.  %@NL@%
  1909.  
  1910. The minimum amount specifies the amount of track-kerning to apply to fonts
  1911. of the minimum size and below. The maximum amount is the track-kerning to
  1912. apply to all fonts at least as large as the maximum size.  %@NL@%
  1913.  
  1914.  
  1915. %@2@%%@CR:C6A00030012 @%%@AB@%3.5  The Driver Menu%@AE@%%@EH@%%@NL@%
  1916.  
  1917. The PCL printer is currently the only supported printer in the Driver menu.
  1918. The PCL Driver dialog box contains information specific to the PCL driver
  1919. for HP LaserJet-type printers. The fields are as follows:  %@NL@%
  1920.  
  1921. %@TH:  70  2522 02 15 32 32 @%
  1922. Field          Description
  1923. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  1924. %@AB@%Symbol Set%@AE@%     Specifies the HP-defined 
  1925.                symbol set for a font. (See 
  1926.                the %@AI@%HP LaserJet Printer %@AE@%
  1927.                %@AI@%Technical Reference Manual%@AE@% for
  1928.                definitions of these symbol 
  1929.                sets.)  The following are the 
  1930.                currently defined symbol sets 
  1931.                (selectable with individual 
  1932.                radio buttons):
  1933.  
  1934.                User Defined 
  1935.                Roman 8 
  1936.                Kana 8 
  1937.                Math 8 
  1938.                U.S. ASCII 
  1939.                Line Draw 
  1940.                Math Symbols 
  1941.                U.S. Legal 
  1942.                Roman Ext. 
  1943.                E.C.M.A. 94 
  1944.                ISO Den/Nor 
  1945.                ISO U.K. 
  1946.                ISO France 
  1947.                ISO Germany 
  1948.                ISO Italy 
  1949.                ISO Sweden/Finland 
  1950.                ISO Spain 
  1951.                Generic 8 
  1952.                Generic 7
  1953.  
  1954. %@AB@%Mem Usage%@AE@%      An approximation of the amount
  1955.                in the printer of memory that 
  1956.                the soft font requires. This 
  1957.                is given in Section 11.4.3, 
  1958.                "Device-Specific Data 
  1959.                Structure," of Part 2, "The 
  1960.                PCL Driver," as the following 
  1961.                formula:
  1962.  
  1963.                ((sum of all character widths 
  1964.                + 7) >> 3) * height + 63
  1965.  
  1966. %@AB@%Escape String%@AE@%  This is the escape string you 
  1967.                send to the printer to select 
  1968.                the font. It may contain any 
  1969.                PCL commands. You may use the 
  1970.                following special sequences to
  1971.                enter control characters:
  1972.  
  1973.                \e                              - escape (ASCII 27, 0x1b) 
  1974.  
  1975.                \[                              - escape (ASCII 27, 0x1b) 
  1976.  
  1977.                \n                              - line feed (ASCII 10, 0xa) 
  1978.  
  1979.                \r                              - carriage return (ASCII 13, 
  1980.                                                0xd) 
  1981.  
  1982.                \xnn                            - hexadecimal character code 
  1983.  
  1984.                \nnn                            - octal character code
  1985.  
  1986.                Notice that when the PFM 
  1987.                Editor displays an escape 
  1988.                string, it converts all 
  1989.                non-ASCII printing characters 
  1990.                to the hexadecimal format \xnn.
  1991.  
  1992. %@TE:  70  2522 02 15 32 32 @%
  1993.  
  1994. As in the other dialog boxes, the OK button causes the items to be committed
  1995. to the .PFM file, and the Cancel button ends the dialog without saving
  1996. changes.  %@NL@%
  1997.  
  1998.  
  1999. %@2@%%@CR:C6A00030013 @%%@AB@%3.6  Creating .PCM Files%@AE@%%@EH@%%@NL@%
  2000.  
  2001. The PCL driver uses printer cartridge metric (PCM) files to define
  2002. cartridges other than built-in Hewlett-Packard(R) cartridges. .PCM files are
  2003. essentially a collection of .PFM files (one for each font in the cartridge).
  2004. %@NL@%
  2005.  
  2006. To make a .PCM file, first create the individual .PFM files for each of the
  2007. cartridge fonts. You can create .PFM files easily with the Printer Font
  2008. Installer. Simply add the font, which must be in the HPPCL format. The
  2009. Printer Font Installer will scan automatically the PCL font and create the
  2010. .PFM file. Use the PFM Editor to edit the file. We recommend that you verify
  2011. all the fields and values. Also, notice that the Printer Font Installer does
  2012. %@AI@%not%@AE@% enter the font escape string. You must do this in the PFM Editor.  %@NL@%
  2013.  
  2014. After you have created all the .PFM files and saved them to disk in one
  2015. directory, choose the File menu's Create PCM File... option to have a dialog
  2016. box appear and prompt you for a .PCM filename. Put this file in the same
  2017. directory as its constituent .PFM files.  %@NL@%
  2018.  
  2019. After you enter a filename and click on the OK button, a second dialog box
  2020. will appear with the .PCM filename in a static control at the top. The first
  2021. edit control in the dialog box enables you to enter the cartridge title,
  2022. which must be a non-empty title (i.e., you must fill in the edit control).
  2023. This title is the string placed in the cartridge selection list box in the
  2024. driver's Printer Setup (device-mode) dialog box. Verify that the correct
  2025. font escape string is defined for each .PFM file.  %@NL@%
  2026.  
  2027. The PFM Editor places a list of .PFM files, that are in the same directory
  2028. as the target .PCM file, in a list box on the left side of the dialog box.
  2029. You may select one or more of these files and move them to the right-hand
  2030. "selected" list box by clicking the Select button (or double-clicking a
  2031. filename). You can remove selected .PFM files or place them back in the
  2032. left-hand "available" list box by selecting filenames in the same manner in
  2033. the right-hand "selected" list box.  %@NL@%
  2034.  
  2035. When you click the OK button, the .PFM files that appear in the right-hand
  2036. list box are placed in the .PCM file. To create the .PCM file, you must
  2037. select at least one .PFM file and have a non-empty title string.  %@NL@%
  2038.  
  2039. When the editor creates the .PCM file, it also creates a text file in the
  2040. same directory with the same name and the extension .INI. On the first line
  2041. of this .INI file is the title of the cartridge; the list of .PFM files
  2042. follows on subsequent lines, one filename per line. Whenever the PCM dialog
  2043. box is chosen, the PFM Editor looks for the .INI file and uses the stored
  2044. data to initialize the title string and the list of selected .PFM files.  %@NL@%
  2045.  
  2046. Notice, however, that editing a .PFM file will not cause the .PCM file to be
  2047. updated. The PFM Editor cannot directly edit .PCM files. Therefore, if you
  2048. make a change in a .PFM file, you must rebuild the .PCM file.  %@NL@%
  2049.  
  2050.  
  2051. %@2@%%@CR:C6A00030014 @%%@AB@%3.7  The PFM Editor Error Messages%@AE@%%@EH@%%@NL@%
  2052.  
  2053. The following error messages can appear when using the PFM Editor. A brief
  2054. explanation of why it appears is given after each message.  %@NL@%
  2055.  
  2056.  
  2057. %@4@%%@AB@%%@AB@%Break character not in character set%@AE@%%@AE@%%@EH@%%@NL@%
  2058.  
  2059. The break character must be between the first and last character in the
  2060. character set, inclusive.  %@NL@%
  2061.  
  2062.  
  2063. %@4@%%@AB@%%@AB@%Can't find filename, ignored%@AE@%%@AE@%%@EH@%%@NL@%
  2064.  
  2065. The .INI file for a .PCM file contained a reference to a .PFM file that is
  2066. not in the same directory or that does not have the .PFM extension.  %@NL@%
  2067.  
  2068.  
  2069. %@4@%%@AB@%%@AB@%Can't open filename, ignored%@AE@%%@AE@%%@EH@%%@NL@%
  2070.  
  2071. The given .PFM file was in the current directory when the list box of
  2072. available .PFM files was created. However, when the attempt to write the
  2073. .PCM file out was made, the .PFM file could not be opened to read it.  %@NL@%
  2074.  
  2075.  
  2076. %@4@%%@AB@%%@AB@%Can't write the PCM file%@AE@%%@AE@%%@EH@%%@NL@%
  2077.  
  2078. An error occurred while writing to the .PCM file or to the associated .INI
  2079. file.  %@NL@%
  2080.  
  2081.  
  2082. %@4@%%@AB@%Changing the character range will invalidate the width table%@AE@%%@EH@%%@NL@%
  2083.  
  2084. If you enter a width table and, then, change the first and last characters,
  2085. the width table will no longer be valid. This really should not occur if you
  2086. have a specific font in mind when you create a .PFM file.  %@NL@%
  2087.  
  2088.  
  2089. %@4@%%@AB@%Couldn't save file %@AB@%filename%@AE@%%@AE@%%@EH@%%@NL@%
  2090.  
  2091. The file specified could not be saved to disk due to an error opening or
  2092. writing the file, or to attempting to write over a Read-Only file, or to
  2093. running out of disk space.  %@NL@%
  2094.  
  2095.  
  2096. %@4@%%@AB@%Default character not in character set%@AE@%%@EH@%%@NL@%
  2097.  
  2098. The default character must be between the first and last character in the
  2099. character set, inclusive.  %@NL@%
  2100.  
  2101.  
  2102. %@4@%%@AB@%Driver information not specified%@AE@%%@EH@%%@NL@%
  2103.  
  2104. You attempted to save a file that does not contain PCL driver information.  %@NL@%
  2105.  
  2106.  
  2107. %@4@%%@AB@%Error creating the initialization file for %@AB@%filename%@AE@%%@AE@%%@EH@%%@NL@%
  2108.  
  2109. The .INI file corresponding to the given file could not be opened.  %@NL@%
  2110.  
  2111.  
  2112. %@4@%%@AB@%Error creating the PCM file %@AB@%filename%@AE@%%@AE@%%@EH@%%@NL@%
  2113.  
  2114. The .PCM file could not be opened due to a bad filename (such as a
  2115. non-existent directory), to a pre-existing Read-Only file of the same name,
  2116. or to being out of disk space.  %@NL@%
  2117.  
  2118.  
  2119. %@4@%%@AB@%filename contains the wrong driver information version%@AE@%%@EH@%%@NL@%
  2120.  
  2121. This is a warning indicating that while the .PFM file appears to be in the
  2122. correct format, the driver specific information contains a version number
  2123. that this PFM Editor does not support.  %@NL@%
  2124.  
  2125.  
  2126. %@4@%%@AB@%filename contains the wrong header version number%@AE@%%@EH@%%@NL@%
  2127.  
  2128. This is a warning indicating that the PFM header has a version number that
  2129. this PFM Editor does not recognize.  %@NL@%
  2130.  
  2131.  
  2132. %@4@%%@AB@%filename does not contain driver information%@AE@%%@EH@%%@NL@%
  2133.  
  2134. The .PFM file does not contain a PCL driver structure.  %@NL@%
  2135.  
  2136.  
  2137. %@4@%%@AB@%filename does not contain extended text metrics%@AE@%%@EH@%%@NL@%
  2138.  
  2139. This is a warning that the .PFM file being read into the PFM Editor does not
  2140. contain extended text metrics.  %@NL@%
  2141.  
  2142.  
  2143. %@4@%%@AB@%filename has been modified. Save before continuing?%@AE@%%@EH@%%@NL@%
  2144.  
  2145. Enables you to save a file or abort an operation before doing something that
  2146. will abandon a modified .PFM file, such as choosing New, Open..., or Exit.  %@NL@%
  2147.  
  2148.  
  2149. %@4@%%@AB@%filename is not a valid file name%@AE@%%@EH@%%@NL@%
  2150.  
  2151. The filename given is invalid because it contains illegal characters or
  2152. syntax errors.  %@NL@%
  2153.  
  2154.  
  2155. %@4@%%@AB@%filename is not a valid PFM file%@AE@%%@EH@%%@NL@%
  2156.  
  2157. The specified file does not contain a .PFM file, or the .PFM file is either
  2158. corrupted or from the wrong version.  %@NL@%
  2159.  
  2160.  
  2161. %@4@%%@AB@%Proportional font requires a width table%@AE@%%@EH@%%@NL@%
  2162.  
  2163. You attempted to save a .PFM file that specifies a proportional font but
  2164. does not contain a width table.  %@NL@%
  2165.  
  2166.  
  2167. %@4@%%@AB@%Unrecognized device %@AB@%devicename%@AE@%%@AE@%%@EH@%%@NL@%
  2168.  
  2169. The PFM contains a device name that the PFM Editor does not recognize. The
  2170. only name recognized currently is "PCL/HP Laserjet."  %@NL@%
  2171.  
  2172.  
  2173. %@4@%%@AB@%Width table will need to be reentered%@AE@%%@EH@%%@NL@%
  2174.  
  2175. This is another warning that changing your character range invalidates your
  2176. width table.  %@NL@%
  2177.  
  2178.  
  2179. %@4@%%@AB@%Write over original %@AB@%filename?%@AE@%%@AE@%%@EH@%%@NL@%
  2180.  
  2181. A file with the same name as the filename you specified in the Save As...
  2182. dialog already exists. Click Yes to write over the old file or No to choose
  2183. a new name.  %@NL@%
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190. %@CR:C6A00040001 @%%@1@%%@AB@%Chapter 4  .PFM Files for PostScript Printers%@AE@%%@EH@%%@NL@%
  2191. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  2192.  
  2193. This chapter discusses the format of .PFM files designed specifically for
  2194. PostScript printers. We recommend that you read Chapter 2, "Printer Font
  2195. Metrics (PFM) Files," first for a description of the general format of .PFM
  2196. files.  %@NL@%
  2197.  
  2198.  
  2199. %@2@%%@CR:C6A00040002 @%%@AB@%4.1  Format of the PostScript .PFM File%@AE@%%@EH@%%@NL@%
  2200.  
  2201. The PostScript .PFM file does not contain a width table. Because PostScript
  2202. fonts are scalable, the widths are contained in the extent table. The
  2203. structures in the file are organized as follows:  %@NL@%
  2204.  
  2205.  
  2206.   1.  PFM header structure (PFMHEADER)%@NL@%
  2207.  
  2208.   2.  PFM extension structure (PFMEXTENSION), must contain a non-NULL
  2209.       pointer to %@AB@%dfExtMetricsOffset%@AE@%, %@AB@%dfExtentTable, %@AE@%and %@AB@%dfDriverInfo%@AE@%%@NL@%
  2210.  
  2211.   3.  Driver name pointed to by %@AB@%dfDevice%@AE@%%@NL@%
  2212.  
  2213.   4.  Microsoft Windows font name pointed to by %@AB@%dfFace%@AE@%%@NL@%
  2214.  
  2215.   5.  Extended Text Metric structure (EXTTEXTMETRIC) pointed to by%@AB@%
  2216. %@AB@%      dfExtMetricsOffset%@AE@%%@NL@%
  2217.  
  2218.   6.  Extent table pointed to by %@AB@%dfExtentTable%@AE@%%@NL@%
  2219.  
  2220.   7.  PostScript font name pointed to by %@AB@%dfDriverInfo%@AE@%%@NL@%
  2221.  
  2222. %@STUB@%      The file may also contain:%@NL@%
  2223.  
  2224.   8.  Pair-kern table pointed to by %@AB@%dfPairKernTable%@AE@%%@NL@%
  2225.  
  2226.   9.  Track-kern table pointed to by %@AB@%dfTrackKernTable%@AE@%%@NL@%
  2227.  
  2228.  
  2229. This is the recommended organization of the file. The PFM header must be the
  2230. first structure in the file and the PFM extension structure must be the
  2231. second one. The remainder of the structures may appear in any order. Their
  2232. locations are indicated by the offsets in the PFM header and PFM extension
  2233. structures.  %@NL@%
  2234.  
  2235. The Windows PostScript driver assumes all PostScript fonts are scalable
  2236. fonts, so it ignores the %@AB@%dfPoints %@AE@%and %@AB@%dfPixHeight %@AE@%fields in the PFM header.
  2237. The fields %@AB@%dfAvgWidth %@AE@%and %@AB@%dfMaxWidth %@AE@%are in units of 1000 units-per-em.  %@NL@%
  2238.  
  2239. Although the PostScript naming convention includes the attributes of the
  2240. font (i.e., bold and italic) in the font name, the attributes should be
  2241. stripped from the font name and represented in the %@AB@%dfWeight %@AE@%and %@AB@%dfItalic
  2242. %@AB@%%@AE@%fields in the PFM header.  %@NL@%
  2243.  
  2244. The extent table is an array of WORDs containing the unscaled widths of the
  2245. characters and assuming 1000 units-per-em. The range of the table should be
  2246. from %@AB@%dfFirstChar %@AE@%to %@AB@%dfLastChar%@AE@%. The size of the table should be %@AB@%dfLastChar %@AE@%-%@AB@%
  2247. %@AB@%dfFirstChar %@AE@%+ 1 WORD.  %@NL@%
  2248.  
  2249. Pair-kern values should be in the same 1000 units-per-em measurement as the
  2250. extents. As of this writing, we do not know of any application that uses the
  2251. track-kern table.  %@NL@%
  2252.  
  2253.  
  2254. %@2@%%@CR:C6A00040003 @%%@AB@%4.2  EXTTEXTMETRIC Data Structure%@AE@%%@EH@%%@NL@%
  2255.  
  2256. The definition of %@AB@%etmMasterHeight %@AE@%and %@AB@%etmMasterUnits%@AE@% is provided in detail
  2257. in Chapter 2, "Printer Font Metrics (PFM) Files." The PostScript driver
  2258. assumes the following values for each font:  %@NL@%
  2259.  
  2260. %@AB@%dfVertRes%@AE@% = 300  %@NL@%
  2261.  
  2262. %@AB@%etmMasterHeight%@AE@% = 300  %@NL@%
  2263.  
  2264. %@AB@%etmMasterUnits%@AE@% = 1000  %@NL@%
  2265.  
  2266. In other words, the driver assumes all fonts use Adobe's standard 1000
  2267. units-per-em method for describing a font. You must build the extent table
  2268. based upon 1000 units-per-em to be consistent with this restriction in the
  2269. driver.  %@NL@%
  2270.  
  2271. The driver also assumes that the font may be scaled to any point size the
  2272. application requests. We recommend that the true scaling range of the font
  2273. be indicated in %@AB@%etmMinScale %@AE@%and %@AB@%etmMaxScale%@AE@% (in device units, at 300 dpi).
  2274. Even though the driver currently ignores these fields, it may use them in
  2275. the future.  %@NL@%
  2276.  
  2277. Because the Windows PostScript driver assumes all PostScript fonts are
  2278. scalable fonts, it ignores the %@AB@%etmPointSize %@AE@%field. Please notice that
  2279. %@AB@%etmSize %@AE@%is not the point size but, rather, the size (i.e., the number of
  2280. bytes) of the EXTTEXTMETRIC structure.  %@NL@%
  2281.  
  2282. As of this writing, we do not know of any application that uses the fields
  2283. in the EXTTEXTMETRIC structure except for %@AB@%etmKernPairs%@AE@%. If your font
  2284. contains kern pairs, you must fill in the EXTTEXTMETRIC structure to
  2285. indicate the number of kern pairs. Do not leave the other fields blank; fill
  2286. them in with reasonable values in the event an application does use them.  %@NL@%
  2287.  
  2288.  
  2289. %@2@%%@CR:C6A00040004 @%%@AB@%4.3  Driver-Specific Data Structure%@AE@%%@EH@%%@NL@%
  2290.  
  2291. The driver-specific data structure pointed to by %@AB@%dfDriverInfo %@AE@%is a
  2292. NULL-terminated string containing the PostScript name for the font. There
  2293. are really two names for the font:  %@NL@%
  2294.  
  2295.  
  2296.   1.  The Windows name for the font, such as "Tms-Rmn,"  which appears in
  2297.       the font list in the application's font dialog box.%@NL@%
  2298.  
  2299.   2.  The PostScript name for the font, which can vary by printer
  2300.       manufacturer and  which the driver sends to the printer to select the
  2301.       font.%@NL@%
  2302.  
  2303.  
  2304. Both strings must be NULL-terminated. The Windows name for the font is
  2305. pointed to by %@AB@%dfFace %@AE@%and the PostScript name for the font is pointed to by
  2306. %@AB@%dfDriverInfo%@AE@%.  %@NL@%
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313. %@CR:C6A00050001 @%%@1@%%@AB@%Chapter 5  .PFM Files for PCL Printers%@AE@%%@EH@%%@NL@%
  2314. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  2315.  
  2316. This chapter discusses the format of .PFM files designed specifically for
  2317. PCL printers. If you have not already done so, we recommend that you read
  2318. Chapter 2, "Printer Font Metrics (PFM) Files," first for a general
  2319. description of .PFM files.  %@NL@%
  2320.  
  2321.  
  2322. %@2@%%@CR:C6A00050002 @%%@AB@%5.1  Format of the PCL .PFM File%@AE@%%@EH@%%@NL@%
  2323.  
  2324. The structures in the PCL .PFM file are organized as follows:  %@NL@%
  2325.  
  2326.  
  2327.   1.  PFM header structure (PFMHEADER)%@NL@%
  2328.  
  2329.   2.  For variable-width fonts, an array of character widths from
  2330.       %@AB@%dfFirstChar %@AE@%to%@AB@% dfLastChar%@AE@%%@NL@%
  2331.  
  2332.   3.  PFM extension structure (PFMEXTENSION)%@NL@%
  2333.  
  2334.   4.  Driver name pointed to by %@AB@%dfDevice%@AE@%%@NL@%
  2335.  
  2336.   5.  Microsoft Windows font name pointed to by %@AB@%dfFace%@AE@%%@NL@%
  2337.  
  2338. %@STUB@%      The file may also contain:%@NL@%
  2339.  
  2340.   6.  Extended Text Metric structure (EXTTEXTMETRIC) pointed to by %@AB@%
  2341. %@AB@%      dfExtMetricsOffset%@AE@%%@NL@%
  2342.  
  2343.   7.  Driver-specific structure pointed to by %@AB@%dfDriverInfo%@AE@%%@NL@%
  2344.  
  2345.   8.  Pair-kern table pointed to by %@AB@%dfPairKernTable%@AE@%%@NL@%
  2346.  
  2347.   9.  Track-kern table pointed to by %@AB@%dfTrackKernTable%@AE@%%@NL@%
  2348.  
  2349.  
  2350. This is the recommended organization of the file. The PFM header must be the
  2351. first structure in the file followed by the width table and the PFM
  2352. extension structure. The remainder of the structures may appear in any
  2353. order. Their locations are indicated by the offsets in the PFM header and
  2354. PFM extension structures.  %@NL@%
  2355.  
  2356. The width table is present if %@AB@%dfPixWidth%@AE@% is zero, which indicates a
  2357. variable-width font. (Otherwise, for fixed-width fonts, the width of all the
  2358. characters in the font equals the value in%@AB@% dfPixWidth%@AE@%.) The width table is
  2359. an array of WORDs containing the widths in device units of characters in the
  2360. range from %@AB@%dfFirstChar%@AE@% to %@AB@%dfLastChar%@AE@%. The width of a character %@AI@%c %@AE@%can be
  2361. located using the formula:  %@NL@%
  2362.  
  2363. %@AS@%  width = WidthTable [c - dfFirstChar]%@AE@%
  2364.  
  2365. The size of the table is %@AB@%dfLastChar%@AE@% - %@AB@%dfFirstChar%@AE@% + 2 WORDs. The last WORD
  2366. is not used and is set to NULL; it should be present for compatability with
  2367. the Windows screen-font file format.  %@NL@%
  2368.  
  2369.  
  2370. %@2@%%@CR:C6A00050003 @%%@AB@%5.2  EXTTEXTMETRIC Data Structure%@AE@%%@EH@%%@NL@%
  2371.  
  2372. As of this writing, we do not know of any application that uses the fields
  2373. in the EXTTEXTMETRIC structure except for %@AB@%etmKernPairs%@AE@%. If your font
  2374. contains kern pairs, you must fill in the EXTTEXTMETRIC structure to
  2375. indicate the number of kern pairs. Do not leave the other fields blank; fill
  2376. them in with reasonable values in the event an application does use them.  %@NL@%
  2377.  
  2378. In the future, there will be .PFM files that describe scalable PCL fonts. To
  2379. guarantee that your raster fonts are never interpreted as scalable fonts,
  2380. make sure that the fields for scaling information in the EXTTEXTMETRIC
  2381. structure indicate a non-scaling font:  %@NL@%
  2382.  
  2383. %@AB@%etmMasterHeight %@AE@%= %@AB@%etmMasterUnits %@AE@%= %@AB@%etmMinScale %@AE@%= %@AB@%etmMaxScale %@AE@%= %@AB@%dfPixHeight  %@AE@%%@NL@%
  2384.  
  2385. See Section 5.5, "Scalable PCL Fonts," for information on how to write a
  2386. .PFM file for scalable PCL fonts.  %@NL@%
  2387.  
  2388.  
  2389. %@2@%%@CR:C6A00050004 @%%@AB@%5.3  Driver-Specific Data Structure%@AE@%%@EH@%%@NL@%
  2390.  
  2391. The SYMBOLSET field is defined as follows:  %@NL@%
  2392.  
  2393. %@AS@%  typedef enum{
  2394. %@AS@%   epsymUserDefined,/* Enumerated type SYMBOLSET */
  2395. %@AS@%   epsymRoman8,
  2396. %@AS@%   epsymKana8,
  2397. %@AS@%   epsymMath8,
  2398. %@AS@%   epsymUSASCII,
  2399. %@AS@%   epsymLineDraw,
  2400. %@AS@%   epsymMathSymbols,
  2401. %@AS@%   epsymUSLegal,
  2402. %@AS@%   epsymRomanExt,
  2403. %@AS@%   epsymISO_DenNor,
  2404. %@AS@%   epsymISO_UK,
  2405. %@AS@%   epsymISO_France,
  2406. %@AS@%   epsymISO_German,
  2407. %@AS@%   epsymISO_Italy,
  2408. %@AS@%   epsymISO_SwedFin,
  2409. %@AS@%   epsymISO_Spain,
  2410. %@AS@%   epsymGENERIC7,
  2411. %@AS@%   epsymGENERIC8,
  2412. %@AS@%   epsymECMA94
  2413. %@AS@%   }SYMBOLSET;%@AE@%
  2414.  
  2415. The TRANSTABLE field is defined as follows:  %@NL@%
  2416.  
  2417. %@AS@%  typedef struct{
  2418. %@AS@%   /* type TRANSTABLE */
  2419. %@AS@%   SYMBOLSET symbolSet;  /* kind of translation table */
  2420. %@AS@%   DWORD offset;   /* location of user-defined table */
  2421. %@AS@%   WORD len;   /* length (in bytes) of table */
  2422. %@AS@%   BYTE firstchar,lastchar;  /* table range */
  2423. %@AS@%   }TRANSTABLE%@AE@%
  2424.  
  2425. The following is the driver-specific data structure pointed to by
  2426. %@AB@%dfDriverInfo %@AE@%:  %@NL@%
  2427.  
  2428. %@AS@%  typedef struct{
  2429. %@AS@%   WORD epSize;  /* size of this data structure */
  2430. %@AS@%   WORD epVersion;  /* number indicating version of struct */
  2431. %@AS@%   DWORD epMemUsage; /* amt of memory font takes up in printer */
  2432. %@AS@%   DWORD epEscape;  /* pointer to escape that selects the font */
  2433. %@AS@%   TRANSTABLE xtbl;  /* character set translation info */
  2434. %@AS@%   }DRIVERINFO;%@AE@%
  2435.  
  2436. The fields in the structure are defined as follows:  %@NL@%
  2437.  
  2438. %@TH:  26  1320 02 34 44 @%
  2439. Field                             Definition
  2440. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  2441. %@AB@%epSize%@AE@%                            The size of this structure (number of 
  2442.                                   bytes)
  2443.  
  2444. %@AB@%epVersion%@AE@%                         The version of this structure, currently 1
  2445.  
  2446. %@AB@%epMemUsage%@AE@%                        The amount of %@AI@%printer%@AE@% memory, in bytes, 
  2447.                                   that this font uses
  2448.  
  2449. %@AB@%epEscape%@AE@%                          The byte offset from the beginning of the 
  2450.                                   file to an escape string invoking the font.
  2451.  
  2452. %@AB@%xtbl.xtSymbolSet%@AE@%                  Symbol set ID, such as%@AB@% epsymRoman8 %@AE@%or %@AB@%%@AE@%
  2453.                                   %@AB@%epsymECMA94%@AE@%
  2454.  
  2455. %@AB@%xtbl.xtOffset%@AE@%                     The byte offset from beginning of the file
  2456.                                   to a custom translation table
  2457.  
  2458. %@AB@%xtbl.xtLen%@AE@%                        The size of the custom translation table
  2459.  
  2460. %@AB@%xtbl.xtFirstChar%@AE@%                  The first character translated in the 
  2461.                                   table
  2462.  
  2463. %@AB@%xtbl.xtLastChar%@AE@%                   The last character translated
  2464.  
  2465. %@TE:  26  1320 02 34 44 @%
  2466.  
  2467. The purpose of the translation table is to enable the driver to translate
  2468. the font from the character set indicated in the %@AB@%dfCharSet %@AE@%field into the
  2469. printer-specific character set. When %@AB@%xtbl.xtSymbolSet%@AE@% equals
  2470. %@AB@%epsymUserDefined%@AE@%, the driver would use the custom translation table pointed
  2471. to by %@AB@%xtbl.xtOffset%@AE@%. However, the Windows PCL driver currently ignores all
  2472. fields in the TRANSTABLE structure except %@AB@%xtbl.xtSymbolSet%@AE@%. In other words,
  2473. even if you put in a custom translation table for future support, the
  2474. current driver will ignore it.  %@NL@%
  2475.  
  2476. The Windows PCL driver supports five possible character translations. It
  2477. determines which internal translation table to use based upon the value of
  2478. %@AB@%xtbl.xtSymbolSet%@AE@%. The tables are as follows:  %@NL@%
  2479.  
  2480. %@TH:   7   487 02 28 48 @%
  2481. Symbol Set                  Translation Table
  2482. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  2483. %@AB@%epsymRoman8%@AE@%                 Roman8_Trans%@AI@%%@AE@%
  2484. %@AB@%epsymUSASCII%@AE@%                USASCII_Trans%@AB@%%@AE@%
  2485. %@AB@%epsymGENERIC7%@AE@%               GENERIC7_Trans
  2486. %@AB@%epsymGENERIC8%@AE@%               GENERIC8_Trans%@AB@%%@AE@%
  2487. %@AB@%epsymECMA94%@AE@%                 ECMA94_Trans%@AB@%%@AE@%
  2488. %@TE:   7   487 02 28 48 @%
  2489.  
  2490. The translation tables are stored in TRANS.H. For %@AB@%epsymRoman8%@AE@%, %@AB@%epsymUSASCII%@AE@%,
  2491. and%@AB@% epsymECMA94%@AE@%, the driver attempts to derive Windows ANSI from the symbol
  2492. set. For %@AB@%epsymGENERIC8 %@AE@%and %@AB@%epsymGENERIC7%@AE@%, the driver simply lets an 8- or
  2493. 7-bit symbol set pass through to the printer unchanged.  %@NL@%
  2494.  
  2495. The driver assumes the width table in the .PFM file contains the widths of
  2496. the characters %@AI@%after%@AE@% translation. If you set %@AB@%epsymRoman8%@AE@%, %@AB@%epsymUSASCII%@AE@%, or
  2497. %@AB@%epsymECMA94 %@AE@%for %@AB@%xtbl.xtSymbolSet%@AE@%, you must use the appropriate translation
  2498. table in TRANS.H to do an inverse translation when building the width table.
  2499. %@NL@%
  2500.  
  2501. A portion of the translation table for %@AB@%epsymRoman8 %@AE@%looks like this:  %@NL@%
  2502.  
  2503. %@AS@%  #define HP_DF_CH ((BYTE) 0x7F)
  2504. %@AS@%  
  2505. %@AS@%  unsigned  char  <+>Roman8_Trans[] = {
  2506. %@AS@%   HP_DF_CH, NULL,   /*  80  */
  2507. %@AS@%   HP_DF_CH, NULL,   /*  81  */
  2508. %@AS@%   ...
  2509. %@AS@%   'Y' ,     0xa8,  /*  dd  */
  2510. %@AS@%   0xf0,     NULL,  /*  de  */
  2511. %@AS@%   0xde,     NULL,  /*  df  */
  2512. %@AS@%   0xc8,     NULL,  /*  e0  */
  2513. %@AS@%   ...
  2514. %@AS@%   0xef,     NULL  }; /*  ff  */%@AE@%
  2515.  
  2516. The table translates characters in the range from 128 to 255. The driver
  2517. uses the character it receives from the application to index into the
  2518. translation table. It replaces the character with the first entry in the
  2519. table. If the second entry is non-NULL, it overstrikes the first character
  2520. with the second character.  %@NL@%
  2521.  
  2522. For example, when the driver detects character hex 0xDD (i.e., the Y-acute
  2523. (Y) in the text stream), the driver will output a capital "Y" overstruck by
  2524. the acute accent. When the overstrike character is present, the driver
  2525. guarantees that the width of the character pair equals the width of the
  2526. first character.  %@NL@%
  2527.  
  2528. If the driver-specific data structure is not present or %@AB@%xtbl.xtSymbolSet%@AE@%
  2529. equals a symbol set other than %@AB@%epsymRoman8%@AE@%, %@AB@%epsymUSASCII%@AE@%, %@AB@%epsymECMA94%@AE@%,
  2530. %@AB@%epsymGENERIC8%@AE@%, or %@AB@%epsymGENERIC7%@AE@%, the driver will default to %@AB@%epsymGENERIC8
  2531. %@AB@%%@AE@%translation if %@AB@%dfLastChar %@AE@%is greater than 127 (an 8-bit font). Otherwise, it
  2532. will use the %@AB@%epsymGENERIC7 %@AE@%translation.  %@NL@%
  2533.  
  2534.  
  2535. %@2@%%@CR:C6A00050005 @%%@AB@%5.4  Kerning Tables%@AE@%%@EH@%%@NL@%
  2536.  
  2537. The pair-kern table follows the format described in Chapter 2, "Printer Font
  2538. Metrics (PFM) Files." The kern amounts are in the same units as the
  2539. character widths.  %@NL@%
  2540.  
  2541. As of this writing, we do not know of any application that uses the
  2542. track-kern table.  %@NL@%
  2543.  
  2544.  
  2545. %@2@%%@CR:C6A00050006 @%%@AB@%5.5  Scalable PCL Fonts%@AE@%%@EH@%%@NL@%
  2546.  
  2547. Currently, the Windows PCL driver supports only non-scaling PCL fonts. In
  2548. the future, however, it may support scalable fonts if PCL printers with
  2549. scaling fonts become available. The driver will detect scalable fonts by
  2550. examining the %@AB@%etmMinScale %@AE@%and %@AB@%etmMaxScale %@AE@%fields in the EXTTEXTMETRIC
  2551. structure. If they are equal, it will assume a non-scaling font. The font
  2552. vendor should provide a .PFM file that follows this format:  %@NL@%
  2553.  
  2554.  
  2555.   1.  PFM header structure (PFMHEADER). The %@AB@%dfPixHeight %@AE@%field must contain
  2556.       the height of a default font size (same as 12 points).%@NL@%
  2557.  
  2558.   2.  For variable-width fonts, an array of character widths from
  2559.       %@AB@%dfFirstChar %@AE@%to %@AB@%dfLastChar %@AE@%for the default point size (%@AB@%dfPixHeight%@AE@%)%@NL@%
  2560.  
  2561.   3.  PFM extension structure (PFMEXTENSION)%@NL@%
  2562.  
  2563.   4.  Driver name pointed to by %@AB@%dfDevice%@AE@%%@NL@%
  2564.  
  2565.   5.  Windows font name pointed to by %@AB@%dfFace%@AE@%%@NL@%
  2566.  
  2567.   6.  Extended Text Metric structure (EXTTEXTMETRIC) pointed to by
  2568.       %@AB@%dfExtMetricsOffset%@AE@%%@NL@%
  2569.  
  2570.   7.  Extent table pointed to by %@AB@%dfExtentTable%@AE@%%@NL@%
  2571.  
  2572.   8.  Device-specific data structure pointed to by %@AB@%dfDriverInfo%@AE@%. The
  2573.       %@AB@%epEscape%@AE@% field must be non-NULL (that is, a printer escape must be
  2574.       provided).%@NL@%
  2575.  
  2576.  
  2577. Optionally, pair-kern and track-kern tables may be provided. The default
  2578. font size and width table should be provided for consistency with the
  2579. existing driver. A future release of the driver will check for the
  2580. difference between %@AB@%etmMinScale %@AE@%and %@AB@%etmMaxScale%@AE@%. If they differ and
  2581. %@AB@%dfExtMetricsOffset %@AE@%is non-NULL, the driver will assume a scalable font.  %@NL@%
  2582.  
  2583. An extent table must be supplied for scalable fonts. The extent table is an
  2584. array of words containing the unscaled widths of the characters. The range
  2585. of the table should be from %@AB@%dfFirstChar %@AE@%to %@AB@%dfLastChar%@AE@%. The size of the table
  2586. should be %@AB@%dfLastChar %@AE@%-%@AB@% dfFirstChar %@AE@%+ 1 WORD.  %@NL@%
  2587.  
  2588. The driver will scale the characters using the formulas described in Section
  2589. 2.3.4, "Font Scaling: etmMasterHeight and etmMasterUnits." The driver will
  2590. not support the ENABLERELATIVEWIDTHS escape, as this would be difficult to
  2591. support with scaling and non-scaling fonts intermixed (scaling fonts use
  2592. font units; non-scaling fonts use device units).  %@NL@%
  2593.  
  2594. The driver will assume %@AB@%dfVertRes%@AE@% equals 300 dpi. Remember that
  2595. %@AB@%etmMasterHeight%@AE@%, %@AB@%etmMinScale%@AE@%, and %@AB@%etmMaxScale%@AE@% must be expressed in device
  2596. units.  %@NL@%
  2597.  
  2598. If the target printer does not force its widths to 300 dpi units (i.e.,
  2599. %@AB@%etmMasterUnits%@AE@% does not equal %@AB@%etmMasterHeight%@AE@%), the driver will attempt to
  2600. correct for roundoff error between the printer's units and the driver's
  2601. imposed 300 dpi units. The driver will correct for the error by maintaining
  2602. a running roundoff value during output of a single line of text.  %@NL@%
  2603.  
  2604. You must provide the driver-specific data structure. As described earlier,
  2605. %@AB@%xtbl.xtSymbolSet%@AE@% must be equal to %@AB@%epsymRoman8%@AE@%, %@AB@%epsymUSASCII%@AE@%, %@AB@%epsymECMA94%@AE@%,
  2606. %@AB@%epsymGENERIC8%@AE@%, or %@AB@%epsymGENERIC7%@AE@%. Remember to use an inverse translation of
  2607. the tables provided in TRANS.H to build the extent table if you select
  2608. %@AB@%epsymRoman8%@AE@%, %@AB@%epsymUSASCII%@AE@%, or %@AB@%epsymECMA94%@AE@%.  %@NL@%
  2609.  
  2610. You must also provide an escape string pointed to by %@AB@%epEscape%@AE@% in the
  2611. driver-specific data structure. The driver will send this escape to the
  2612. printer to select the font.  %@NL@%
  2613.  
  2614. If pair or track kerns exist, they should use the same units as the
  2615. character widths in the extent table.  %@NL@%
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622. %@CR:C6A-Part 02 @%%@1@%%@AB@%PART II  The PCL Driver%@AE@%%@EH@%%@NL@%
  2623. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  2624.  
  2625. This part presents technical aspects of the version 3.3 Microsoft Windows
  2626. PCL / HP LaserJet printer driver. It should be read by technical support
  2627. specialists, font vendors, Windows application developers, and advanced
  2628. users. Because most of the issues with PCL printing under Windows involve
  2629. fonts, most of this document is dedicated to a discussion of fonts and font
  2630. management.  %@NL@%
  2631.  
  2632. We assume that the audience for this document has knowledge of how to use
  2633. the PCL driver's Printer Font Installer (documented in Part 1, "Fonts," and
  2634. under Help in the "Printer Font Installer" dialog box), build a Windows .PFM
  2635. (Printer Font Metrics) file, and use MS-DOS(R) and a text editor.  %@NL@%
  2636.  
  2637. Knowledge of the Printer Font Installer is the basic requirement for
  2638. understanding Chapters 8 through 12. Knowledge of .PFM files is important
  2639. for developers and font vendors reading the sections involving .PFM file
  2640. generation. Knowledge of MS-DOS is important for executing the
  2641. recommendations outlined in Chapter 12, "Installer Scenarios."  %@NL@%
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648. %@CR:C6A00060001 @%%@1@%%@AB@%Chapter 6  Overview of the PCL Driver%@AE@%%@EH@%%@NL@%
  2649. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  2650.  
  2651. The version 3.3 Microsoft Windows PCL/HP LaserJet printer driver includes
  2652. many enhancements over the previous versions, along with a few bug fixes.
  2653. The following is a brief list highlighting the most important ones:  %@NL@%
  2654.  
  2655.  
  2656.   1.  Carried over from version 3.2 was the ability to add additional font
  2657.       support for cartridges by using the Soft Font Installer and for
  2658.       providing an easy mechanism, with our new PFM Editor, for technicians
  2659.       with some font experience to create the information file needed by the
  2660.       driver to support the cartridge.%@NL@%
  2661.  
  2662. %@STUB@%      With the PFMEDIT utility, printer and font vendors will find it easy
  2663.       to create .PFM files by simply plugging in the relevant font data.
  2664.       They can then define all the fonts in a cartridge in multiple .PFM
  2665.       files and consolidate this information into one .PCM file.%@NL@%
  2666.  
  2667. %@STUB@%      Once the .PCM file is installed, you can "Exit" to the main
  2668.       device-mode dialog box and see the cartridge listed at the end of the
  2669.       "Cartridges" list box. The cartridge can now be selected in the same
  2670.       manner as the other cartridges listed in the box.%@NL@%
  2671.  
  2672.   2.  The name of the Soft Font Installer was changed to the Printer Font
  2673.       Installer to better describe its versatility. The installer was also
  2674.       removed from the driver and made into a separate dynamic-link library
  2675.       (DLL) called FINSTALL.DLL.%@NL@%
  2676.  
  2677.   3.  All the cartridge font information was removed from the driver and
  2678.       placed into individual Printer Cartridge Metrics (PCM) files. Several
  2679.       .PCM files are prebuilt into the driver.%@NL@%
  2680.  
  2681.   4.  We enhanced the dialog box interface for the main driver and the
  2682.       Printer Font Installer for the following reasons:
  2683.  
  2684.       ■   To take advantage of new controls supported in Windows 3.0.%@NL@%
  2685.  
  2686.       ■   To make the interface more consistent with Presentation Manager
  2687.           printer dialogs.%@NL@%
  2688. %@NL@%
  2689.  
  2690.   5.  We fine tuned the driver to use less fixed memory and did other
  2691.       performance tuning.%@NL@%
  2692.  
  2693.   6.  We provided support for the new driver initialization API, which is
  2694.       documented in the %@AI@%Microsoft Windows Software Development Kit%@AE@%. %@NL@%
  2695.  
  2696.   7.  We provided support for raster compression on the HP LaserJet IIP.
  2697. %@NL@%
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705. %@CR:C6A00070001 @%%@1@%%@AB@%Chapter 7  WIN.INI Flags%@AE@%%@EH@%%@NL@%
  2706. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  2707.  
  2708. This chapter describes the flags that the Microsoft Windows PCL / HP
  2709. LaserJet printer driver writes to and reads from the WIN.INI file. Most of
  2710. these flags are controlled either directly or indirectly by the user via the
  2711. driver-specific device-mode dialog box and the Printer Font Installer.
  2712. Normally, the user should have no need to modify these flags manually.  %@NL@%
  2713.  
  2714. The %@AI@%options%@AE@% and %@AI@%white_text%@AE@% flags are the only flags to which the user does
  2715. not have access via a dialog box. The user would have to edit the WIN.INI
  2716. file to modify these flags.  %@NL@%
  2717.  
  2718. The driver places and updates flags in WIN.INI via Windows functions.
  2719. However, notice that:  %@NL@%
  2720.  
  2721.  
  2722.   1.  The driver has no control over the order of entries in the WIN.INI
  2723.       file.%@NL@%
  2724.  
  2725.   2.  The driver does not currently "delete" entries from the WIN.INI file.%@NL@%
  2726.  
  2727.  
  2728. The order of entries in the WIN.INI file is insignificant and has no effect
  2729. on the operation of the driver. The driver does not delete an entire entry
  2730. line from WIN.INI; it removes only everything to the right of the equal sign
  2731. (=). The title text to the left of the equal sign remains there forever, or
  2732. until the user manually removes it.  %@NL@%
  2733.  
  2734.  
  2735. %@2@%%@CR:C6A00070002 @%%@AB@%7.1  Summary of Flags%@AE@%%@EH@%%@NL@%
  2736.  
  2737. The WIN.INI flags are summarized below. A detailed description of each flag
  2738. and its use is provided in the next section.  %@NL@%
  2739.  
  2740. %@AB@%Flag%@AE@%                              %@AB@%Description%@AE@%
  2741. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  2742. %@AB@%cartindex%@AE@%%@AI@%n%@AE@%                        The cartridge(s) selected in the 
  2743.                                   cartridge listbox
  2744.  
  2745. %@AB@%Cartridge%@AE@%%@AI@%n%@AE@%                        The name of a .PCM file
  2746.  
  2747. %@AB@%copies%@AE@%                            The number of uncollated copies of each 
  2748.                                   page
  2749.  
  2750. %@AB@%duplex%@AE@%                            The duplex printing option (0=simplex)
  2751.  
  2752. <%@AB@%filename%@AE@%>                        Used by Printer Font Installer to track 
  2753.                                   permanently downloaded font filenames
  2754.  
  2755. %@AB@%Flag%@AE@%                              %@AB@%Description%@AE@%
  2756. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  2757. %@AI@%%@AE@%
  2758.  
  2759. %@AB@%FontSummary%@AE@%                       The name of the font information file 
  2760.                                   built by the driver
  2761.  
  2762. %@AB@%fsvers%@AE@%                            The version of the FontSummary file
  2763.  
  2764. %@AB@%MaxFontSummary%@AE@%                    The maximum allowable size (in Mb) of 
  2765.                                   the FontSummary file
  2766.  
  2767. %@AB@%numcart%@AE@%                           The number of cartridges the user has 
  2768.                                   selected
  2769.  
  2770. %@AB@%options%@AE@%                           On/off settings for printer rest, force 
  2771.                                   load of soft font information, and allow
  2772.                                   vertical clipping
  2773.  
  2774. %@AB@%orient%@AE@%                            Printer orientation
  2775.  
  2776. %@AB@%paper%@AE@%                             Paper size selection
  2777.  
  2778. %@AB@%prtcaps%@AE@%                           A bit field representing the printer 
  2779.                                   capabilities
  2780.  
  2781. %@AB@%prtindex%@AE@%                          The index to the currently selected 
  2782.                                   printer (includes memory option)
  2783.  
  2784. %@AB@%prtresfac%@AE@%                         The printer resolution factor 
  2785.                                   (determines resolution in dots-per-inch)
  2786.  
  2787. %@AB@%sfdir%@AE@%                             The path to the directory containing 
  2788.                                   soft fonts
  2789.  
  2790. %@AB@%sfdlbat%@AE@%                           The path and filename of the batch file 
  2791.                                   that downloads permanent fonts to the 
  2792.                                   printer
  2793.  
  2794. %@AB@%sfdlstyle%@AE@%                         The manner in which permanent soft fonts
  2795.                                   should be downloaded
  2796.  
  2797. %@AB@%SoftFont%@AE@%%@AI@%n%@AE@%                         The soft font entry or entries in the 
  2798.                                   WIN.INI file
  2799.  
  2800. %@AB@%SoftFonts%@AE@%                         The number of soft fonts and cartridges 
  2801.                                   listed in the WIN.INI file
  2802.  
  2803. %@AB@%tray%@AE@%                              The input paper tray
  2804.  
  2805. %@AB@%white_text%@AE@%                        Used for setting the driver's 
  2806.                                   sensitivity to detecting white text
  2807.  
  2808.  
  2809. %@2@%%@CR:C6A00070003 @%%@AB@%7.2  Details on Flags%@AE@%%@EH@%%@NL@%
  2810.  
  2811. This section contains a detailed description of each flag and how to use it.
  2812. %@NL@%
  2813.  
  2814.  
  2815. %@3@%%@CR:C6A00070004 @%%@AB@%7.2.1  Cartindex%@AB@%n%@AE@%%@AE@%%@EH@%%@NL@%
  2816.  
  2817. This flag provides the cartridge selected in the cartridge list box. The
  2818. number of selectable cartridges depends on the printer. The driver is
  2819. capable, though, of selecting up to eight cartridges at one time.  %@NL@%
  2820.  
  2821. The following is the flag for the first cartridge the user selects:  %@NL@%
  2822.  
  2823. %@AB@%cartindex%@AE@%=%@AI@%n%@AE@%  %@NL@%
  2824.  
  2825. The flag for the second cartridge that the user selects is as follows:  %@NL@%
  2826.  
  2827. %@AB@%cartindex1%@AE@%=%@AI@%n%@AE@%  %@NL@%
  2828.  
  2829. Subsequent flags are %@AB@%cartindex2%@AE@%, %@AB@%cartindex3%@AE@%, %@AB@%cartindex4%@AE@%, %@AB@%cartindex5%@AE@%,
  2830. %@AB@%cartindex6%@AE@%, and %@AB@%cartindex7%@AE@%. The number of flags in use (i.e., the number of
  2831. cartridges the user has selected) is contained in the %@AB@%numcarts%@AE@% flag.  %@NL@%
  2832.  
  2833. The cartridge index (%@AI@%n%@AE@% in the above examples) is a number representing the
  2834. selected font cartridge. The cartridge index depends on the order in which
  2835. the user selects available cartridges or installs new ones.  %@NL@%
  2836.  
  2837.  
  2838. %@3@%%@CR:C6A00070005 @%%@AB@%7.2.2  Cartridgen%@AE@%%@EH@%%@NL@%
  2839.  
  2840. This flag is used in conjunction with the %@AB@%cartindex%@AE@%%@AI@%n%@AE@% flag. If another value
  2841. is used in the %@AB@%cartindex%@AE@%%@AI@%n%@AE@% flag, the PCL driver looks for a cartridge<number>
  2842. = PCMfile entry, which defines an external cartridge selected by the driver.
  2843. %@NL@%
  2844.  
  2845. For example, %@AB@%cartindex%@AE@%=100 causes the driver to select the cartridge defined
  2846. by the %@AB@%Cartridge100%@AE@%= line.  %@NL@%
  2847.  
  2848.  
  2849. %@3@%%@CR:C6A00070006 @%%@AB@%7.2.3  Copies%@AE@%%@EH@%%@NL@%
  2850.  
  2851. This flag provides the number of uncollated copies of each page that the
  2852. driver should request from the printer. It may be a number between 1 and 99.
  2853. "Copies" is a printer feature; the driver sends down one image of the page
  2854. and requests the printer to repeat it for the requested number of copies.
  2855. For example, if the user specifies two copies of a three page document, the
  2856. driver will print two copies of page 1, two copies of page 2, and two copies
  2857. of page 3 (i.e., the printing order would be pages 1, 1, 2, 2, 3, 3).  %@NL@%
  2858.  
  2859. Collated copies (printing order 1, 2, 3, 1, 2, 3) is not a function of the
  2860. driver. It is a function of the application. The application sends an image
  2861. of the page to the printer for each copy requested, which is considerably
  2862. slower than printing uncollated copies.  %@NL@%
  2863.  
  2864. The driver always writes "%@AB@%copies%@AE@%=1" to the WIN.INI file, even if the user
  2865. requested more than one copy. The driver remembers that the user requested
  2866. more than one copy (via the driver's memory-resident device-mode structure),
  2867. but it does not write the actual number of copies requested to the WIN.INI
  2868. file. The result is the driver will print the desired number of copies as
  2869. long as the user stays in Windows. If the user exits Windows and re-enters,
  2870. the driver reverts back to 1 copy.  %@NL@%
  2871.  
  2872. If the user manually changes the %@AB@%copies=%@AE@% line in the WIN.INI file before
  2873. entering Windows, the driver will use that as the default number of copies.
  2874. However, the next time the user pulls up the driver-specific dialog, the
  2875. driver will overwrite the user's manually entered value with a 1. The next
  2876. time the user exits and re-enters Windows, the default number of copies will
  2877. revert to 1.  %@NL@%
  2878.  
  2879.  
  2880. %@3@%%@CR:C6A00070007 @%%@AB@%7.2.4  Duplex%@AE@%%@EH@%%@NL@%
  2881.  
  2882. This flag contains a value between 0 and 3 that indicates the type of duplex
  2883. printing:  %@NL@%
  2884.  
  2885. %@TH:   5   322 02 15 15 46 @%
  2886. Value ver 3.2  Value ver 3.3  Printing option
  2887. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  2888. 0              1              Simplex 
  2889. 1              2              Duplex/Vertical binding 
  2890. 2              3              Duplex/Horizontal binding
  2891. %@TE:   5   322 02 15 15 46 @%
  2892.  
  2893. %@AI@%Duplexing%@AE@% is the ability of the printer to print on both sides of the page.
  2894. %@AI@%Vertical%@AE@% (or long-edge) binding means that the printer turns the sheet along
  2895. the long edge, %@AI@%horizontal%@AE@% (or short-edge) binding means that the printer
  2896. turns the sheet along the short edge. See Figure 7.1 for examples of
  2897. vertical and horizontal binding.  %@NL@%
  2898.  
  2899. %@AU@%(This figure may be found in the printed book).%@AE@%%@NL@%
  2900.  
  2901.  
  2902. %@3@%%@CR:C6A00070008 @%%@AB@%7.2.5  <Filename>%@AE@%%@EH@%%@NL@%
  2903.  
  2904. The <%@AB@%filename%@AE@%> flag is used by the PCL driver's Printer Font Installer to
  2905. keep track of the names of permanently downloaded font files. In the
  2906. Window's convention for listing soft fonts (described in Section 7.2.19,
  2907. "SoftFontn"), a permanently downloaded font file is specified by a soft font
  2908. entry without a download file. The installer stores the name under the
  2909. <%@AB@%filename%@AE@%> flag. For example, %@AB@%SoftFont%@AE@%%@AI@%n%@AE@% = PFM File and, then, PFM File =
  2910. Download File.  %@NL@%
  2911.  
  2912.  
  2913. %@3@%%@CR:C6A00070009 @%%@AB@%7.2.6  FontSummary%@AE@%%@EH@%%@NL@%
  2914.  
  2915. This flag is the name of the font information file that the driver builds.
  2916. The file contains the internal font data structure used by the driver.
  2917. Because it may take a long time to build this data structure, the driver
  2918. saves it to file whenever it builds it. The driver constructs the name of
  2919. the file from the prefix "FS" combined with the port name. It then truncates
  2920. the resultant name to eight characters (maximum MS-DOS filename length) and
  2921. concatenates the .PCL file extension to the name. For example, the
  2922. FontSummary file for LPT1 is called FSLPT1.PCL.  %@NL@%
  2923.  
  2924. The driver maintains a different copy of the data structure in the
  2925. FontSummary file for every configuration the user has selected from the
  2926. driver-specific dialog. For example, if the user changed the printer in the
  2927. printer list box, the driver will build a new font data structure and %@AI@%add%@AE@% it
  2928. to the FontSummary file. If the user reverts to the originally selected
  2929. printer, the driver will revert to the original font data structure (still
  2930. in the FontSummary file).  %@NL@%
  2931.  
  2932. The driver maintains a "most recently used" list of the data structures in
  2933. the FontSummary file. It will delete the least recently used structures to
  2934. shorten the size of the FontSummary file if necessary. By default, the
  2935. driver limits the file to 100K, but the user may change it with the
  2936. %@AB@%MaxFontSummary%@AE@% flag.  %@NL@%
  2937.  
  2938. The driver also maintains a different FontSummary file for every port.
  2939. Because the user may have loaded soft fonts or cartridges under certain
  2940. ports, the font information may change from port to port.  %@NL@%
  2941.  
  2942. If the user has loaded soft fonts, it may take the driver a long time to
  2943. build its internal font data structure, which is why the structure is saved
  2944. to file once it is built. If the user has more than 15 soft fonts loaded
  2945. under a given port, the driver will show a "Building font database" message
  2946. whenever it has to build its font data structure. When the driver reads the
  2947. font data structure from the FontSummary file, it will not show the
  2948. "Building font database" message.  %@NL@%
  2949.  
  2950. The driver places the FontSummary file in the directory that contains the
  2951. driver executable file HPPCL.DRV. For example, a typical entry for the PCL /
  2952. HP LaserJet on LPT1 would be:  %@NL@%
  2953.  
  2954. %@AS@%  FontSummary=C:\WINDOWS\FSLPT1.PCL%@AE@%
  2955.  
  2956.  
  2957. %@3@%%@CR:C6A00070010 @%%@AB@%7.2.7  Fsvers%@AE@%%@EH@%%@NL@%
  2958.  
  2959. The FontSummary file version number is a value that starts at 1 and is
  2960. incremented every time the driver modifies the FontSummary file. The value
  2961. of %@AB@%fsvers%@AE@% resides in both the WIN.INI file and the header of the FontSummary
  2962. file. The driver verifies that the two version numbers are the same every
  2963. time it attempts to read a font data structure from the FontSummary file. If
  2964. the version numbers are different, then the driver discards the FontSummary
  2965. file and builds a new one.  %@NL@%
  2966.  
  2967. This flag exists primarily for the Printer Font Installer. Whenever the user
  2968. modifies soft font information via the installer, it increments the value in
  2969. %@AB@%fsvers%@AE@%. This causes the driver to rebuild its internal font database instead
  2970. of reading an invalid one from the FontSummary file.  %@NL@%
  2971.  
  2972.  
  2973. %@3@%%@CR:C6A00070011 @%%@AB@%7.2.8  MaxFontSummary%@AE@%%@EH@%%@NL@%
  2974.  
  2975. The %@AB@%MaxFontSummary%@AE@% flag is the maximum allowable size (in kilobytes) of the
  2976. FontSummary file. The driver keeps a "most recently used" list of the
  2977. internal font databases it builds and saves to the FontSummary file. It
  2978. deletes the least recently used structures to ensure that the file size is
  2979. less than %@AB@%MaxFontSummary%@AE@%.  %@NL@%
  2980.  
  2981. The size of the FontSummary file depends upon the number of soft fonts the
  2982. user has loaded. On the average, the file will range from 3 to 10 kilobytes.
  2983. By default, the maximum allowable size of the file is 100K.  %@NL@%
  2984.  
  2985. If %@AB@%MaxFontSummary%@AE@% is 1 or greater, the minimum FontSummary file size is
  2986. equal to the size of the most recently used font data structure. In other
  2987. words, if there is only one data structure in the file, the driver will not
  2988. trim the FontSummary file even if its size exceeds %@AB@%MaxFontSummary%@AE@%.  %@NL@%
  2989.  
  2990. To force the driver never to build a FontSummary file, the user should add
  2991. "%@AB@%MaxFontSummary%@AE@%=0" to the driver-specific section of the WIN.INI file.  %@NL@%
  2992.  
  2993.  
  2994. %@3@%%@CR:C6A00070012 @%%@AB@%7.2.9  Numcart%@AE@%%@EH@%%@NL@%
  2995.  
  2996. The %@AB@%numcart%@AE@% flag contains the number of cartridges the user has selected. If
  2997. it is zero, no cartridges have been selected (i.e., "none" in the cartridge
  2998. list box).  %@NL@%
  2999.  
  3000. If it is 1, then the flag %@AB@%cartindex%@AE@% contains the index to the selected
  3001. cartridge. If it is 2, then %@AB@%cartindex%@AE@% and %@AB@%cartindex1%@AE@% contain the cartridge
  3002. indexes. This pattern repeats up to %@AB@%cartindex7%@AE@% for the eighth cartridge
  3003. selected.  %@NL@%
  3004.  
  3005. The driver %@AI@%can%@AE@% allow the user to select up to eight cartridges at one time.
  3006. However, the number of cartridges the driver %@AI@%does%@AE@% allow the user to select
  3007. depends upon the printer selected in the printer list box.  %@NL@%
  3008.  
  3009. You can deteremine the number of cartridges that a printer supports by
  3010. selecting the appropriate printer name from the PCL/HP LaserJet dialog box.
  3011. The maximum number of cartridges supported is indicated above the cartridges
  3012. list.  %@NL@%
  3013.  
  3014.  
  3015. %@3@%%@CR:C6A00070013 @%%@AB@%7.2.10  Options%@AE@%%@EH@%%@NL@%
  3016.  
  3017. The %@AB@%options%@AE@% flag is a bit-field of on/off settings. The bits (in
  3018. hexadecimal) and their meaning are as follows:  %@NL@%
  3019.  
  3020. %@TH:   6   474 02 08 48 20 @%
  3021. Value   Meaning                                         Default setting
  3022. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  3023. 0x0002  Reset the printer (ESC + E) between print jobs  ON 
  3024. 0x0004  Force the driver to load soft fonts             OFF 
  3025. 0x0008  Enable vertical text clipping                   OFF
  3026. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  3027. %@TE:   6   474 02 08 48 20 @%
  3028.  
  3029. The default %@AB@%options%@AE@% value is 0x0003.  %@NL@%
  3030.  
  3031. To modify the other bits, the user must edit the WIN.INI file. Here are some
  3032. examples:  %@NL@%
  3033.  
  3034.  
  3035.   ■   To disable printer reset between jobs:%@NL@%
  3036.  
  3037. %@STUB@%      %@AB@%options%@AE@%=2%@NL@%
  3038.  
  3039.   ■   To force the driver to load soft fonts on a standard LaserJet, as well
  3040.       as options 1 and 2:%@NL@%
  3041.  
  3042. %@STUB@%      %@AB@%options%@AE@%=7  (4+2+1)%@NL@%
  3043.  
  3044.   ■   To enable vertical text clipping, as well as options 1 and 2:%@NL@%
  3045.  
  3046. %@STUB@%      %@AB@%options%@AE@%=11  (8+2+1)%@NL@%
  3047.  
  3048.   ■   To force the loading of soft fonts and to enable vertical text
  3049.       clipping, as well as everything else:%@NL@%
  3050.  
  3051. %@STUB@%      %@AB@%options%@AE@%=15  (8+4+2+1)%@NL@%
  3052.  
  3053.  
  3054. By default, the driver always resets the printer between print jobs if bit 1
  3055. is set. This clears any macros and temporarily downloaded fonts that resided
  3056. in the printer's memory before the job was sent. If the user does not want
  3057. to have the printer reset between print jobs, this bit may be set to zero.  %@NL@%
  3058.  
  3059. ────────────────────────────────────────────────────────────────────────────%@NL@%
  3060. NOTE
  3061.  
  3062. %@AI@%The driver %@AI@%always%@AE@%%@AI@% assumes it has all%@AE@%%@AI@% the printer's memory available to it to
  3063. %@AI@%print the job. It also always assumes it must download any temporary soft
  3064. %@AI@%fonts in the job.%@AE@%%@AE@%
  3065. ────────────────────────────────────────────────────────────────────────────%@NL@%
  3066.  
  3067. The "force the driver to load soft fonts" bit causes the driver to load soft
  3068. font information even for printers that cannot handle soft fonts. Normally,
  3069. the driver loads soft font information based upon the printer's ability to
  3070. handle them. However, sometimes users list .PFM files for %@AI@%cartridge%@AE@% fonts or
  3071. %@AI@%printer-resident%@AE@% fonts that the driver does not know about (for more
  3072. information on this topic, see Section 12.7, "Setting Up .PFM Files for
  3073. Resident and Cartridge Fonts"). In this situation, the user would want the
  3074. driver to load soft font information even on a printer that does not
  3075. normally handle soft fonts.  %@NL@%
  3076.  
  3077. Enabling this bit will cause the driver to assume that the printer can
  3078. handle all the soft font information listed in the WIN.INI file. In other
  3079. words, if there are normal soft fonts listed in WIN.INI along with the
  3080. special .PFM files for %@AI@%cartridge%@AE@% or %@AI@%printer-resident%@AE@% fonts, the driver will
  3081. load %@AI@%all%@AE@% the fonts. If the user selects one of the real soft fonts, the
  3082. driver will attempt to download it to the printer.  %@NL@%
  3083.  
  3084. Because PCL does not allow text clipping, the driver must simulate text
  3085. clipping for the application. Text clipping is the ability of the driver to
  3086. %@AI@%not print%@AE@% text that lies outside of a clip region defined by the
  3087. application. The driver always clips text horizontally, but it only clips
  3088. text vertically if the "enable vertical text clipping" bit is set.  %@NL@%
  3089.  
  3090. The driver clips text in an all-or-none fashion. If any part of the letter
  3091. is outside of the clip rectangle, the whole letter is not printed. If any
  3092. part of the line is on the top or bottom edge of the clip rectangle, the
  3093. whole line is not printed (if vertical text clipping is enabled).  %@NL@%
  3094.  
  3095. In most cases, vertical text clipping is unnecessary. For example, if a user
  3096. modifies the height of a row in Microsoft Excel by a small amount, the
  3097. driver will (vertically) clip all the text in that row and not print it.
  3098. This can be confusing to the user. Therefore, it is best to set the driver
  3099. to print the text in this case.  %@NL@%
  3100.  
  3101. However, Aldus PageMaker's clipping logic assumes that the driver can clip
  3102. partial lines. If any part of the line is within the clip rectangle,
  3103. PageMaker will send it to the driver. There may be situations (most likely
  3104. to occur if the user is printing a tiled publication) in which PageMaker
  3105. will send a line to the driver that straddles the top or bottom of the page
  3106. image area. If vertical text clipping is disabled, the driver will send the
  3107. line to the printer. Since it is beyond the printer's image area, the
  3108. printer will randomly print the line somewhere on the page. This problem may
  3109. be corrected by enabling vertical text clipping which will simply clip the
  3110. line and not print it.  %@NL@%
  3111.  
  3112.  
  3113. %@3@%%@CR:C6A00070014 @%%@AB@%7.2.11  Orient%@AE@%%@EH@%%@NL@%
  3114.  
  3115. The %@AB@%orient%@AE@% flag is the orientation in which the document should be printed.
  3116. The values are as follows:  %@NL@%
  3117.  
  3118. %@TH:   4   247 02 15 15 46 @%
  3119. Value ver 3.2  Value ver 3.3  Orientation
  3120. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  3121. 15             1              Portrait
  3122. 16             2              Landscape
  3123. %@TE:   4   247 02 15 15 46 @%
  3124.  
  3125.  
  3126. %@3@%%@CR:C6A00070015 @%%@AB@%7.2.12  Paper%@AE@%%@EH@%%@NL@%
  3127.  
  3128. The %@AB@%paper%@AE@% variable selects the paper size on which to print. The values are
  3129. as follows:  %@NL@%
  3130.  
  3131. %@TH:   9   417 02 15 15 46 @%
  3132. Value ver 3.2  Value ver 3.3  Paper
  3133. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  3134. 20             1              Letter 
  3135. 21             9              A4 
  3136. 22             5              Legal 
  3137. 23             13             B5 
  3138. 24             7              Executive 
  3139. 25             8              A3 
  3140. 26             4              Ledger
  3141. %@TE:   9   417 02 15 15 46 @%
  3142.  
  3143.  
  3144. %@3@%%@CR:C6A00070016 @%%@AB@%7.2.13  Prtcaps%@AE@%%@EH@%%@NL@%
  3145.  
  3146. This flag is a bit-field of the capabilities of the currently selected
  3147. printer. The driver reads its value from an internal data structure; it
  3148. %@AI@%never%@AE@% reads this flag from the WIN.INI file. It then writes its value to the
  3149. WIN.INI file so other applications may read it.  %@NL@%
  3150.  
  3151. This flag exists for applications that need to know the capabilities of the
  3152. printer that the user has selected. For example, font generation utilities
  3153. may need to know if the printer can handle soft fonts, or if the printer can
  3154. handle soft fonts above 30 points.  %@NL@%
  3155.  
  3156. The values of this field changed between the version 3.0 and 3.1 driver. The
  3157. fields that represented paper information in the 3.0 driver were removed.
  3158. Two new fields (for handling envelope feed) were added where paper
  3159. information fields used to exist. The definition of some fields was slightly
  3160. modified.  %@NL@%
  3161.  
  3162. The %@AI@%old%@AE@% list of capabilities bits (in hexadecimal) was as follows:  %@NL@%
  3163.  
  3164. %@TH:  38  1198 02 08 08 62 @%
  3165. Status  Value   Definition
  3166. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  3167.         0x0001  Printer has capabilities of a standard LaserJet
  3168.  
  3169.         0x0002  Printer has capabilities of a LaserJet Plus
  3170.  
  3171.         0x0004  Printer has capabilities of a LaserJet 500
  3172.  
  3173.         0x0008  Lower tray is handled
  3174.  
  3175.         0x0010  Printer does %@AI@%not%@AE@% support downloadable fonts
  3176.  
  3177.         0x0020  Manual feed is %@AI@%not%@AE@% supported
  3178.  
  3179.         0x0040  Printer cannot support internal bit stripping
  3180.  
  3181. old     0x0080  Printer can handle B5 paper
  3182.  
  3183. old     0x0100  Printer emulates an HP LaserJet
  3184.  
  3185. old     0x0200  Printer can handle Exec paper
  3186.  
  3187. old     0x0400  Printer can handle A3 paper
  3188.  
  3189. old     0x0800  Printer can handle ledger paper
  3190.  
  3191.         0x1000  Printer can print duplex
  3192.  
  3193.         0x2000  Printer selects paper bin based on paper size (auto paper 
  3194.                 select)
  3195.  
  3196.         0x4000  Printer can print fonts in any orientation (auto font 
  3197.                 rotation)
  3198.  
  3199. old     0x8000  Printer uses new paper select strings
  3200.  
  3201. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  3202.  
  3203. %@TE:  38  1198 02 08 08 62 @%
  3204.  
  3205. The %@AI@%new%@AE@% list of capabilities bits (in hexadecimal) is as follows:  %@NL@%
  3206.  
  3207. %@TH:  39  1316 02 08 08 62 @%
  3208. Status  Value   Definition
  3209. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  3210.         0x0001  Printer has capabilities of a standard LaserJet
  3211.  
  3212.         0x0002  Printer has capabilities of a LaserJet Plus
  3213.  
  3214.         0x0004  Printer has capabilities of a LaserJet 500
  3215.  
  3216.         0x0008  Lower tray is handled
  3217.  
  3218.         0x0010  Printer does %@AI@%not%@AE@% support downloadable fonts
  3219.  
  3220.         0x0020  Manual feed is %@AI@%not%@AE@% supported
  3221.  
  3222.         0x0040  Printer cannot support internal bit stripping
  3223.  
  3224. new     0x0080  Printer supports manual/envelope feed
  3225.  
  3226. new     0x0100  Printer is an HP PCL emulation printer
  3227.  
  3228. new     0x0200  Printer supports new (LaserJet IID) envelope feed
  3229.  
  3230. new     0x0400  Printer can print duplex like the LaserJet IID
  3231.  
  3232. new     0x0800  Printer has white rules and compression like the LaserJet 
  3233.                 IIP
  3234.  
  3235.         0x1000  Printer can print duplex
  3236.  
  3237.         0x2000  Printer selects paper bin based on paper size (auto paper 
  3238.                 select)
  3239.  
  3240.         0x4000  Printer can print fonts in any orientation (auto font 
  3241.                 rotation)
  3242.  
  3243. new     0x8000  Printer has the capabilities of a LaserJet Series II
  3244.  
  3245. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  3246.  
  3247. %@TE:  39  1316 02 08 08 62 @%
  3248.  
  3249. The bits for envelope feed are new to the version 3.1 driver. Bit 0x0080 is
  3250. set if the printer selects envelopes using the manual/envelope feed escape
  3251. defined in the %@AI@%HP LaserJet Technical Reference Manual%@AE@%. Even though most HP
  3252. printers and clones support this escape, the bit is set only for printers
  3253. that actually have an envelope feed attachment for the printer.  %@NL@%
  3254.  
  3255. The second envelope feed escape, bit 0x0200, is set for the HP LaserJet IID.
  3256. The driver uses the HP-defined escape, which is special for this printer's
  3257. envelope feeder.  %@NL@%
  3258.  
  3259. The second duplex bit is also new to the version 3.1 driver. The first
  3260. duplex bit, 0x8000, supports duplex for the LaserJet 2000. The second duplex
  3261. bit, 0x0400, supports duplex in the same manner that the LaserJet IID prints
  3262. two-sided pages.  %@NL@%
  3263.  
  3264. As stated earlier, the driver writes only the %@AB@%prtcaps%@AE@% flag to the WIN.INI
  3265. file. It reads it from its internal data structure, based upon the currently
  3266. selected printer.  %@NL@%
  3267.  
  3268. If the %@AB@%prtcaps%@AE@% flag is not present, outside applications should assume that
  3269. the capabilities of the standard LaserJet are in use.  %@NL@%
  3270.  
  3271.  
  3272. %@3@%%@CR:C6A00070017 @%%@AB@%7.2.14  Prtindex%@AE@%%@EH@%%@NL@%
  3273.  
  3274. The %@AB@%prtindex%@AE@% flag is the index to the currently selected printer.  %@NL@%
  3275.  
  3276. As printers are added, the index values will shuffle. No application outside
  3277. of the PCL driver should access these numbers. Applications that want to
  3278. determine the capabilities of the selected printer should look at the
  3279. %@AB@%prtcaps%@AE@% flag.  %@NL@%
  3280.  
  3281.  
  3282. %@3@%%@CR:C6A00070018 @%%@AB@%7.2.15  Prtresfac%@AE@%%@EH@%%@NL@%
  3283.  
  3284. The %@AB@%prtresfac%@AE@% flag is the printer resolution factor. 300 dpi shifted right
  3285. by this number yields the printer resolution. Possible values are as
  3286. follows:  %@NL@%
  3287.  
  3288. %@AB@%Value%@AE@%                             %@AB@%Resolution%@AE@%
  3289. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  3290. 0                                 300 dpi 
  3291.  
  3292. 1                                 150 dpi 
  3293.  
  3294. 2                                 75 dpi
  3295.  
  3296.  
  3297. %@3@%%@CR:C6A00070019 @%%@AB@%7.2.16  Sfdir%@AE@%%@EH@%%@NL@%
  3298.  
  3299. The %@AB@%sfdir%@AE@% flag is the path to the directory containing the soft fonts. This
  3300. is typically C:\PCLFONTS, C:\PCLPFM, or C:\FONTS.  %@NL@%
  3301.  
  3302.  
  3303. %@3@%%@CR:C6A00070020 @%%@AB@%7.2.17  Sfdlbat%@AE@%%@EH@%%@NL@%
  3304.  
  3305. The %@AB@%sfdlbat%@AE@% flag contains the path and name of the batch file that downloads
  3306. permanent soft fonts to the printer. The Printer Font Installer generates
  3307. this file whenever the user sets up permanent soft fonts.  %@NL@%
  3308.  
  3309. A typical entry would look like the following:  %@NL@%
  3310.  
  3311. %@AS@%  sfdlbat=C:\PCLPFM\SFLPT1.BAT%@AE@%
  3312.  
  3313. The name of the file is constructed from the prefix "SF" combined with the
  3314. port name. The resultant name is truncated to eight characters (maximum
  3315. MS-DOS filename length) and the .BAT file extension is concatenated to the
  3316. name.  %@NL@%
  3317.  
  3318.  
  3319. %@3@%%@CR:C6A00070021 @%%@AB@%7.2.18  Sfdlstyle%@AE@%%@EH@%%@NL@%
  3320.  
  3321. The %@AB@%sfdlstyle%@AE@% flag is the manner in which soft fonts should be downloaded.
  3322. This flag is a bit-field, and the values (in hexadecimal) are as follows:  %@NL@%
  3323.  
  3324. %@AB@%Value%@AE@%                             %@AB@%Meaning%@AE@%
  3325. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  3326. 0x10                              Download fonts "now" (when the user 
  3327.                                   exits the installer) 
  3328.  
  3329. 0x20                              Download fonts when the user turns on 
  3330.                                   the computer
  3331.  
  3332. Potential %@AB@%sfdlstyle%@AE@% values would be as follows:  %@NL@%
  3333.  
  3334.  
  3335.   ■   Do not download fonts:%@NL@%
  3336.  
  3337. %@STUB@%      %@AB@%sfdlstyle%@AE@%=0%@NL@%
  3338.  
  3339.   ■   Download fonts at startup only:%@NL@%
  3340.  
  3341. %@STUB@%      %@AB@%sfdlstyle%@AE@%=32%@NL@%
  3342.  
  3343.   ■   Download fonts when the user exits the installer and at startup:%@NL@%
  3344.  
  3345. %@STUB@%      %@AB@%sfdlstyle%@AE@%=48%@NL@%
  3346.  
  3347.  
  3348.  
  3349. %@3@%%@CR:C6A00070022 @%%@AB@%7.2.19  SoftFontn%@AE@%%@EH@%%@NL@%
  3350.  
  3351. This is the soft font entry in the WIN.INI file. The format for listing soft
  3352. fonts in the WIN.INI file is a Microsoft Windows standard (i.e., all printer
  3353. drivers should list soft fonts in this manner). This format is described in
  3354. Part 1, "Fonts." The mechanism is described briefly here. A typical soft
  3355. font entry would look like the following example:  %@NL@%
  3356.  
  3357. %@AS@%  SoftFonts=9
  3358. %@AS@%  SoftFont1=C:\PCLFONTS\OPPR0090.PFM
  3359. %@AS@%  SoftFont2=C:\PCLFONTS\OPPB0090.PFM
  3360. %@AS@%  SoftFont3=C:\PCLFONTS\OPPI0090.PFM
  3361. %@AS@%  SoftFont4=C:\PCLFONTS\OPPR0110.PFM
  3362. %@AS@%  SoftFont5=C:\PCLFONTS\OPPB0110.PFM,C:\PCLFONTS\OP110BPN.R8P
  3363. %@AS@%  SoftFont6=C:\PCLFONTS\OPPI0110.PFM,C:\PCLFONTS\OP110IPN.R8P
  3364. %@AS@%  SoftFont7=C:\PCLFONTS\OPPR0240.PFM,C:\PCLFONTS\OP240RPN.R8P
  3365. %@AS@%  SoftFont8=C:\PCLFONTS\OPPB0240.PFM,C:\PCLFONTS\OP240BPN.R8P
  3366. %@AS@%  SoftFont9=C:\PCLFONTS\OPPI0240.PFM,C:\PCLFONTS\OP240IPN.R8P%@AE@%
  3367.  
  3368. In addition to these entries, which are defined as the "standard" format for
  3369. listing soft fonts, the PCL driver's Printer Font Installer would add the
  3370. following entries:  %@NL@%
  3371.  
  3372. %@AS@%  C:\PCLFONTS\OPPR0090.PFM=C:\PCLFONTS\OP090RPN.R8P
  3373. %@AS@%  C:\PCLFONTS\OPPB0090.PFM=C:\PCLFONTS\OP090BPN.R8P
  3374. %@AS@%  C:\PCLFONTS\OPPI0090.PFM=C:\PCLFONTS\OP090IPN.R8P
  3375. %@AS@%  C:\PCLFONTS\OPPR0110.PFM=C:\PCLFONTS\OP110RPN.R8P%@AE@%
  3376.  
  3377. The %@AB@%SoftFont%@AE@%%@AI@%n%@AE@% entry lists the two files necessary for a soft font to be used
  3378. in Windows. The first file is the Windows Printer Font Metrics (PFM) file.
  3379. The second file is the downloadable font file. The .PFM file contains the
  3380. metrics used by the driver to provide Windows applications with information
  3381. about the fonts. Information such as font height, character widths, and
  3382. pair-kern tables are contained in the .PFM file. Part 1, "Fonts," contains
  3383. descriptions of the contents of .PFM files.  %@NL@%
  3384.  
  3385. The .PFM portion of the %@AB@%SoftFont%@AE@%%@AI@%n%@AE@% entry must always be listed in the WIN.INI
  3386. file. The downloadable font file, if listed, follows the name of the .PFM
  3387. file. The two names are separated by a comma. The presence of the
  3388. downloadable font filename indicates that the font is set up for %@AI@%temporary%@AE@%
  3389. download. This means that the driver should download the font to the printer
  3390. the first time it encounters text in the font during a print job. The font
  3391. will be deleted at the end of the print job.  %@NL@%
  3392.  
  3393. The absence of the downloadable font filename indicates to the driver that
  3394. the font has been permanently downloaded to the printer and is also used to
  3395. indicate that the font is a printer-resident or cartridge font (see Section
  3396. 12.7, "Setting Up .PFM Files for Resident and Cartridge Fonts"). Permanently
  3397. downloaded fonts are sent to the printer when it is turned on and remain in
  3398. the printer's memory until it is turned off. The driver uses the font by
  3399. sending the Font ID string to the printer. The Font ID must equal the value
  3400. of %@AI@%n%@AE@% in the %@AB@%SoftFont%@AE@%%@AI@%n%@AE@% flag.  %@NL@%
  3401.  
  3402. The PCL driver's Printer Font Installer adds one more convention: for every
  3403. font set up for permanent download, it adds an entry to the WIN.INI file in
  3404. the form:  %@NL@%
  3405.  
  3406. %@STUB@%    <PFM filename>=<downloadable font filename>%@NL@%
  3407.  
  3408. The installer does this because it needs to keep track of the downloadable
  3409. font filename. If a font is set up for %@AI@%permanent%@AE@% download, that means that
  3410. the downloadable font filename is not present. To keep track of the download
  3411. filename, the installer adds the "<PFM filename>=<downloadable font
  3412. filename>" entry.  %@NL@%
  3413.  
  3414. The PCL driver also supports two other aspects of the soft font entries.
  3415. These are not considered to be part of the standard for setting up soft
  3416. fonts in Windows:  %@NL@%
  3417.  
  3418.  
  3419.   ■   The driver allows the user to abbreviate the %@AB@%SoftFont%@AE@%%@AI@%n%@AE@% flag.%@NL@%
  3420.  
  3421.   ■   The driver does not require the %@AB@%SoftFont%@AE@%%@AI@%n%@AE@% entries to be in order.%@NL@%
  3422.  
  3423.  
  3424. The PCL driver looks for a match in the %@AB@%SoftFont%@AE@%%@AI@%n%@AE@% flag up to the length of
  3425. the flag in the WIN.INI file. If, for example, the flag in WIN.INI were
  3426. "%@AB@%soft1%@AE@%=<etc>," or even "%@AB@%so1%@AE@%=<etc>," the driver would recognize the flag as a
  3427. %@AB@%SoftFont%@AE@%%@AI@%n%@AE@% entry. However, this capability exists in the driver only for
  3428. historical reasons; it is recommended that users not abbreviate the
  3429. %@AB@%SoftFont%@AE@%%@AI@%n%@AE@% flag.  %@NL@%
  3430.  
  3431. The PCL driver does not require that soft fonts be listed in one contiguous
  3432. range. Some drivers, on the other hand, require contiguous ranges. For
  3433. example, if "%@AB@%SoftFonts%@AE@%=3," the driver would expect the three soft font
  3434. entries to be as follows:  %@NL@%
  3435.  
  3436. %@STUB@%    %@AB@%SoftFont1%@AE@%=<etc>%@NL@%
  3437.  
  3438. %@STUB@%    %@AB@%SoftFont2%@AE@%=<etc>%@NL@%
  3439.  
  3440. %@STUB@%    %@AB@%SoftFont3%@AE@%=<etc>%@NL@%
  3441.  
  3442. For the PCL driver, though, the entries could just as easily be %@AB@%SoftFont2%@AE@%,
  3443. %@AB@%SoftFont8%@AE@%, and %@AB@%SoftFont10%@AE@%, or any other non-contiguous set of flags. It
  3444. scans the WIN.INI file for all the soft font entries. It will also load %@AI@%all%@AE@%
  3445. the soft fonts regardless of how many soft fonts the %@AB@%SoftFonts%@AE@% flag
  3446. indicates are available.  %@NL@%
  3447.  
  3448.  
  3449. %@3@%%@CR:C6A00070023 @%%@AB@%7.2.20  SoftFonts%@AE@%%@EH@%%@NL@%
  3450.  
  3451. This gives the number of soft fonts listed in the WIN.INI file.  %@NL@%
  3452.  
  3453.  
  3454. %@3@%%@CR:C6A00070024 @%%@AB@%7.2.21  Tray%@AE@%%@EH@%%@NL@%
  3455.  
  3456. The %@AB@%tray%@AE@% flag contains the input paper tray. Possible values are as follows:
  3457. %@NL@%
  3458.  
  3459. %@TH:   6   367 02 15 15 46 @%
  3460. Value ver 3.2  Value ver 3.3  Paper tray
  3461. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  3462. 30             1              Default paper tray ("top tray") 
  3463. 31             2              Lower paper tray 
  3464. 32             4              Manual feed 
  3465. 33             7              Auto paper feed
  3466. %@TE:   6   367 02 15 15 46 @%
  3467.  
  3468. The "Lower" paper tray on the LaserJet 2000 is the middle tray. The user
  3469. gains access to the paper deck by selecting "Auto paper feed."  %@NL@%
  3470.  
  3471.  
  3472. %@3@%%@CR:C6A00070025 @%%@AB@%7.2.22  White_text%@AE@%%@EH@%%@NL@%
  3473.  
  3474. The %@AB@%white_text%@AE@% flag controls the value of "white" text. Because the PCL
  3475. driver does not have white text (e.g., for reverse text), the driver
  3476. attempts to "synthesize" white text by not sending it to the printer. The
  3477. %@AB@%white_text%@AE@% flag gives the user the ability to adjust the driver's
  3478. sensitivity to white text.  %@NL@%
  3479.  
  3480. Please notice that PCL printers are not capable of actually printing white
  3481. text. This section describes how the driver behaves when the application
  3482. assigns the color "white" to text. The %@AB@%white_text%@AE@% flag is used by the driver
  3483. to determine how to detect white text. When the driver detects that the
  3484. color of the text is white, it does not send the text to the printer.  %@NL@%
  3485.  
  3486. The driver detects white text by looking at the RGB value passed to it by
  3487. the application. An RGB value consists of three numbers indicating the red,
  3488. green, and blue components of the color. Possible values range from 0 to 255
  3489. for each color. 0 means full saturation (or black) of the color; 255 means
  3490. no color (or white). A value between 0 and 255 means partial saturation of
  3491. the color. If the R, G, and B components are 0, the color is black. If all
  3492. three numbers are 255, the color is white.  %@NL@%
  3493.  
  3494. The driver applies the following logic to detect white text:  %@NL@%
  3495.  
  3496.  
  3497.   ■   If all three values of red, green, and blue are greater than or equal
  3498.       to the value of %@AB@%white_text%@AE@%, then the color is white and the text
  3499.       should %@AI@%not%@AE@% be printed. %@NL@%
  3500.  
  3501.   ■   If at least one of the R, G, or B components is less than %@AB@%white_text%@AE@%,
  3502.       then the color is printed.%@NL@%
  3503.  
  3504.  
  3505. By default, the driver uses a %@AB@%white_text%@AE@% value of 255. This means that the
  3506. text must be truly white for the driver not to print it. The driver regards
  3507. any text that has a value close to white, but not exactly white, as black
  3508. and prints it.  %@NL@%
  3509.  
  3510. The user may make the driver regard all text as white text with the value:  %@NL@%
  3511.  
  3512. %@AB@%white_text%@AE@%=0  %@NL@%
  3513.  
  3514. And always print all text with the value:  %@NL@%
  3515.  
  3516. %@AB@%white_text%@AE@%=256  %@NL@%
  3517.  
  3518. This flag exists in the event an application wants a finer control over
  3519. white text printing than the driver's default approach to determining what
  3520. constitutes white text.  %@NL@%
  3521.  
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527. %@CR:C6A00080001 @%%@1@%%@AB@%Chapter 8  Permanent Soft Fonts%@AE@%%@EH@%%@NL@%
  3528. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  3529.  
  3530. Permanent soft fonts are downloaded to the printer when the printer is
  3531. turned on and remain there until the printer is turned off. Because
  3532. permanent fonts are not sent to the printer during the print job, they pose
  3533. some interesting problems. This chapter explores some of these problems and
  3534. how the Printer Font Installer solves them.  %@NL@%
  3535.  
  3536. Permanent fonts are downloaded to the printer %@AI@%sometime%@AE@% after power up. The
  3537. driver does not have to be active, nor does Microsoft Windows need to be
  3538. running for permanent fonts to be downloaded to the printer. In fact,
  3539. permanent fonts are typically downloaded to the printer when the user first
  3540. turns on the computer.  %@NL@%
  3541.  
  3542.  
  3543. %@2@%%@CR:C6A00080002 @%%@AB@%8.1  Setting Up Fonts for Download%@AE@%%@EH@%%@NL@%
  3544.  
  3545. The user tells the Printer Font Installer that a font should be set up for
  3546. permanent download by selecting the font in the installer's list box and
  3547. clicking on the "Permanent" button at the bottom of the list box. See Help
  3548. in the "Printer Font Installer" dialog box for a description of the user
  3549. interface to the installer.  %@NL@%
  3550.  
  3551. The installer enables the user to change the status (i.e., from temporary to
  3552. permanent) of one font at a time. The font receiving the status change is
  3553. the one whose name appears on the status line at the bottom of the installer
  3554. dialog. The installer only enables one font at a time to be modified to
  3555. prevent the user from converting a large number of fonts to permanent
  3556. download.  %@NL@%
  3557.  
  3558. The first time a user changes a font from temporary to permanent status, the
  3559. installer pops up a warning dialog. This dialog reminds the user that
  3560. permanent fonts take up printer memory and, therefore, only the most
  3561. frequently used fonts should be permanently downloaded to the printer.  %@NL@%
  3562.  
  3563. When the user exits the installer, it prompts the user for the download
  3564. style. If the user selects "Download now," the installer will send a print
  3565. job consisting of the permanent fonts to the printer. If the user selects
  3566. "Download at startup," the installer will build a batch file that downloads
  3567. the fonts to the printer and edits the AUTOEXEC.BAT file to call the batch
  3568. file.  %@NL@%
  3569.  
  3570. The user may select both, one, or none of these options. As long as the user
  3571. has permanent soft fonts, the installer pops up this dialog box every time
  3572. the user exits the installer.  %@NL@%
  3573.  
  3574. As part of downloading permanent fonts, the installer sends a "delete all
  3575. fonts" escape to the printer. This forces the printer to delete all
  3576. permanently downloaded fonts. After downloading the new fonts, a banner page
  3577. (in portrait format) is printed that shows the fonts that have been
  3578. downloaded. Portrait fonts are shown in the typeface that was downloaded.  %@NL@%
  3579.  
  3580. Downloading permanent fonts "now" (i.e., upon exiting the installer) is not
  3581. very difficult for the driver. The installer simply opens a Windows print
  3582. job and sends down the fonts. Downloading fonts "at startup" (i.e., when the
  3583. user turns on the machine) is more complex.  %@NL@%
  3584.  
  3585. To set up the downloading of permanent fonts at startup, the installer
  3586. performs the following tasks:  %@NL@%
  3587.  
  3588.  
  3589.   1.  Writes an executable program that prompts the user to download fonts. %@NL@%
  3590.  
  3591.   2.  Creates a batch that downloads the fonts and writes out the banner
  3592.       page.%@NL@%
  3593.  
  3594.   3.  Edits the AUTOEXEC.BAT file to call the download batch file.%@NL@%
  3595.  
  3596.  
  3597. The executable program presents the user with a yes/no prompt for
  3598. downloading permanent soft fonts. The program is stored in the driver's
  3599. resources and written to its own file when the installer is setting up fonts
  3600. for permanent download. The download batch file calls this executable
  3601. program.  %@NL@%
  3602.  
  3603. The program presents the user with the prompt:  %@NL@%
  3604.  
  3605. Download PCL fonts to <%@AI@%port name%@AE@%>? [y/n]  %@NL@%
  3606.  
  3607. If the user responds "no," the program returns 1, and the batch file tests
  3608. the MS-DOS ERRORLEVEL and exits without downloading fonts.  %@NL@%
  3609.  
  3610. If the user responds "yes," the program returns an MS-DOS ERRORLEVEL of 0,
  3611. and the batch file proceeds to download fonts. For example, this sample
  3612. download batch file downloads one permanent font, "Tms Rmn 12pt," to the
  3613. printer:  %@NL@%
  3614.  
  3615. %@AS@%  rem HPPCL -- Downloading fonts
  3616. %@AS@%  echo off
  3617. %@AS@%  C:\PCLFONTS\PCLSF0YN.EXE LPT1:
  3618. %@AS@%  if ERRORLEVEL 1 goto nodownload
  3619. %@AS@%  echo {ESC}E{ESC}*c0F > LPT1:
  3620. %@AS@%  echo {ESC}(s3t0b0s12v10h0P{ESC}&a0c0RPermanently downloaded
  3621. %@AS@%   font(s):{ESC}&l2D > %tmp%\pcl3.tmp
  3622. %@AS@%  echo {ESC}*c1D > %tmp%\pcl1.tmp
  3623. %@AS@%  echo {ESC}*c1d5F > %tmp%\pcl2.tmp
  3624. %@AS@%  
  3625. %@AS@%  
  3626. %@AS@%  echo {ESC}(1X*Tms Rmn  12pt >> %tmp%\pcl3.tmp
  3627. %@AS@%  copy %tmp%\pcl1.tmp+C:\PCLFONTS\TR120RPN.USP/b+%tmp%\pcl2.tmp/a 
  3628. %@AS@%   LPT1:/b
  3629. %@AS@%  echo {FF} >> %tmp%\pcl3.tmp
  3630. %@AS@%  copy %tmp%\pcl3.tmp LPT1:
  3631. %@AS@%  erase %tmp%\pcl1.tmp
  3632. %@AS@%  erase %tmp%\pcl2.tmp
  3633. %@AS@%  erase %tmp%\pcl3.tmp
  3634. %@AS@%  :nodownload%@AE@%
  3635.  
  3636. The download batch file creates the following three temporary files:  %@NL@%
  3637.  
  3638. %@AB@%File%@AE@%                              %@AB@%Function%@AE@%
  3639. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  3640. TMP1                              Sets up the permanent Font ID.
  3641.  
  3642. TMP2                              Assigns the Font ID to the downloaded 
  3643.                                   font.
  3644.  
  3645. TMP3                              Downloads the banner.
  3646.  
  3647. The sample download batch file shows how these temporary files are used.
  3648. Notice that the batch file takes advantage of the MS-DOS batch file string
  3649. substitution feature. That is, every reference to a temporary file is
  3650. preceded with %tmp%. If the user has an environment variable "tmp," then
  3651. MS-DOS will replace the string with the temporary directory path. If the
  3652. environment variable does not exist, MS-DOS will replace the string with a
  3653. NULL string. The temporary files will be written to the user's root
  3654. directory.  %@NL@%
  3655.  
  3656. The batch file is invoked from the user's AUTOEXEC.BAT file. The installer
  3657. edits the AUTOEXEC.BAT file and appends the following strings to the file:  %@NL@%
  3658.  
  3659. %@AS@%  rem The Windows PCL / HP LaserJet driver added the next line
  3660. %@AS@%  command /c C:\PCLFONTS\SFLPT1.BAT%@AE@%
  3661.  
  3662. The string that invokes the download batch file uses the MS-DOS "command /c"
  3663. option. This enables MS-DOS to suspend execution of the AUTOEXEC.BAT file to
  3664. execute the download file, then return to the execution of the AUTOEXEC.BAT
  3665. file. Without "command /c," MS-DOS would not return to executing the
  3666. AUTOEXEC.BAT file (i.e., any commands after the line in the AUTOEXEC.BAT
  3667. file would not be executed).  %@NL@%
  3668.  
  3669. The installer appends this string to the AUTOEXEC.BAT file by stepping to
  3670. the end of the file and then backing up until it hits a character greater
  3671. than or equal to a space. This circumvents a problem some users may have if
  3672. they use Windows Notepad to edit their AUTOEXEC.BAT file. Windows Notepad
  3673. sometimes writes an end-of-file character as the last valid character in the
  3674. file. An application that blindly appends text to the AUTOEXEC.BAT will
  3675. append it %@AI@%after%@AE@% the end-of-file character. The added text would be ignored
  3676. when MS-DOS executed the AUTOEXEC.BAT file.  %@NL@%
  3677.  
  3678. There are always potential problems when an application "automatically"
  3679. edits the user's AUTOEXEC.BAT file. These programs typically will either
  3680. append text to the file (like the installer) or place text at the beginning
  3681. of the file. Both approaches present some problems:  %@NL@%
  3682.  
  3683.  
  3684.   ■   Some users have special "menu templates" that are executed from the
  3685.       AUTOEXEC.BAT file. These templates are typically set up by dealers for
  3686.       the users. From the template, the user executes the applications he or
  3687.       she wants to use. The user never exits this template utility to return
  3688.       to the execution of the AUTOEXEC.BAT file.%@NL@%
  3689.  
  3690.   ■   Other users set up soft fonts to be permanently downloaded to a port
  3691.       that is a remote printer on a network. Typically, the network software
  3692.       is executed somewhere at the beginning of the AUTOEXEC.BAT file. The
  3693.       download commands must appear %@AI@%after%@AE@% the network software runs.%@NL@%
  3694.  
  3695.  
  3696. If an application appends text to the AUTOEXEC.BAT file, it runs the risk of
  3697. the commands never being executed. If the application inserts the commands
  3698. at the beginning of the file, it runs the risk of executing the commands
  3699. before certain other vital commands are executed.  %@NL@%
  3700.  
  3701. If a user sets up fonts for permanent download, but they are not being
  3702. downloaded to the printer, the commands in the AUTOEXEC.BAT file are
  3703. probably not being executed. The problem may be solved by moving the
  3704. commands in the AUTOEXEC.BAT file.  %@NL@%
  3705.  
  3706. Although the command line the installer writes to the AUTOEXEC.BAT file may
  3707. be moved in the file, it should never be modified. This is because the
  3708. installer always looks for the line and modifies it appropriately. The
  3709. installer searches the AUTOEXEC.BAT file for the line and changes it without
  3710. changing the file size. It does not assume it is at the bottom of the file.
  3711. %@NL@%
  3712.  
  3713. For example, if the user sets up some soft fonts for permanent download at
  3714. startup, the installer will build the download batch file and add this line
  3715. to the AUTOEXEC.BAT file:  %@NL@%
  3716.  
  3717. %@AS@%  rem The Windows PCL / HP LaserJet driver added the next line
  3718. %@AS@%  command /c C:\PCLFONTS\SFLPT1.BAT%@AE@%
  3719.  
  3720. If the user then re-enters the installer and changes all the permanent fonts
  3721. to temporary, the installer (upon exit) parses the AUTOEXEC.BAT file and
  3722. modifes the command line to:  %@NL@%
  3723.  
  3724. %@AS@%  rem The Windows PCL / HP LaserJet driver added the next line
  3725. %@AS@%  rem     C:\PCLFONTS\SFLPT1.BAT%@AE@%
  3726.  
  3727. This has the effect of disabling the download command without deleting it.
  3728. If the user once again enters the installer and makes some fonts permanent,
  3729. the installer (upon exit) will locate the commented line in the AUTOEXEC.BAT
  3730. file and uncomment it:  %@NL@%
  3731.  
  3732. %@AS@%  rem The Windows PCL / HP LaserJet driver added the next line
  3733. %@AS@%  command /c C:\PCLFONTS\SFLPT1.BAT%@AE@%
  3734.  
  3735.  
  3736. %@2@%%@CR:C6A00080003 @%%@AB@%8.2  Tracking Permanent Fonts in the WIN.INI File%@AE@%%@EH@%%@NL@%
  3737.  
  3738. The format for listing soft fonts in the WIN.INI file is a Microsoft Windows
  3739. standard (i.e., all printer drivers should list soft fonts in this manner).
  3740. This format is described in Part 1, "Fonts." The mechanism is briefly
  3741. described in Section 7.2.19, "SoftFontn."  %@NL@%
  3742.  
  3743. With driver version 3.0 or earlier, users added soft fonts using PCLPFM, not
  3744. the Printer Font Installer. PCLPFM is the utility that used to be shipped
  3745. with the PCL driver (version 1.05a and earlier). This utility generated .PFM
  3746. files from downloadable font files and created an APPNDWIN.INI file. After
  3747. running PCLPFM, the user would manually edit the WIN.INI file to add the
  3748. %@AB@%SoftFont%@AE@%%@AI@%n%@AE@% entries.  %@NL@%
  3749.  
  3750. By default, PCLPFM set up all the fonts for temporary download. If the user
  3751. wanted to set up fonts for permanent download, then he or she was instructed
  3752. to %@AI@%remove%@AE@% the name of the downloadable font file from the %@AB@%SoftFont%@AE@%%@AI@%n%@AE@% line in
  3753. the WIN.INI file. The user was responsible for setting up the mechanism for
  3754. downloading the permanent fonts to the printer.  %@NL@%
  3755.  
  3756. For example, suppose the following entries were added to WIN.INI by the
  3757. Printer Font Installer:  %@NL@%
  3758.  
  3759. %@AS@%  [HPPCL,LPT1]
  3760. %@AS@%  SoftFonts=2
  3761. %@AS@%  SoftFont1=C:\PCLFONTS\OPPR0110.PFM
  3762. %@AS@%  SoftFont2=C:\PCLFONTS\OPPB0110.PFM,C:\PCLFONTS\OP110BPN.R8P
  3763. %@AS@%  C:\PCLFONTS\OPPR0110.PFM=C:\PCLFONTS\OP110RPN.R8P%@AE@%
  3764.  
  3765. The same fonts added from PCLPFM (with help from the user) would look like
  3766. this:  %@NL@%
  3767.  
  3768. %@AS@%  [HPPCL,LPT1]
  3769. %@AS@%  SoftFont1=C:\PCLPFM\OP110RPP.PFM
  3770. %@AS@%  SoftFont2=C:\PCLPFM\OP110BPP.PFM,C:\PCLPFM\OP110BPN.R8P%@AE@%
  3771.  
  3772. This mechanism posed a problem for the Printer Font Installer. With the name
  3773. of the permanently downloaded font missing, how could the installer locate
  3774. the font? Also, since the user may have already set up a mechanism for
  3775. downloading those fonts to the printer, how could the installer work around
  3776. it?  %@NL@%
  3777.  
  3778. The best approach to resolving the problem was to inform users that they
  3779. should go back into their WIN.INI file and restore the fonts to temporary
  3780. status (add %@AI@%back%@AE@% the name of the permanent font file). The users should also
  3781. remove any utilities they had that downloaded the fonts  %@NL@%
  3782.  
  3783. To handle fonts set up for permanent download by PCLPFM, the installer
  3784. applies the following logic:  %@NL@%
  3785.  
  3786.  
  3787.   ■   If the installer has no record of the downloadable font filename, then
  3788.       it simply skips the filename when it sets up the permanent download
  3789.       batch file.%@NL@%
  3790.  
  3791.   ■   If the user attempts to change the font from permanent to temporary
  3792.       status, the installer requires the user to provide a name for the
  3793.       downloadable font file.%@NL@%
  3794.  
  3795.  
  3796. When the installer creates its download batch file, it will not report an
  3797. error if it cannot find the name of the downloadable font file. It does this
  3798. for two reasons:  %@NL@%
  3799.  
  3800.  
  3801.   1.  The installer assumes the user removed the filename. The user also
  3802.       probably has some utility that automatically downloaded those fonts.
  3803.       Those fonts will continue to be downloaded via the old mechanism,
  3804.       while any new fonts changed to permanent by the installer will be
  3805.       downloaded by the installer.%@NL@%
  3806.  
  3807.   2.  There is another mechanism by which the user can provide the driver
  3808.       with .PFM files for %@AI@%cartridge%@AE@% or %@AI@%printer-resident%@AE@% fonts unknown to the
  3809.       driver. In this mechanism, only the .PFM file is listed. The
  3810.       downloadable font file does not exist. The installer will not report
  3811.       that it cannot download fonts, which prevents confusion for the user.%@NL@%
  3812.  
  3813.  
  3814. When the user attempts to change a font from permanent to temporary status,
  3815. the installer prompts the user to provide the name of the downloadable font
  3816. file. If the user cannot provide the name, then the user cannot change the
  3817. font's status.  %@NL@%
  3818.  
  3819. The installer attempts to manufacture the name of the downloadable font file
  3820. by assuming that it resides in the same directory as the .PFM file and that
  3821. the name was automatically assigned by PCLPFM. Since PCLPFM derived the .PFM
  3822. filename from the downloadable font filename, the installer simply reverses
  3823. the logic to get the downloadable font filename from the .PFM filename. This
  3824. manufactured name is presented to the user as part of the prompt for the
  3825. filename.  %@NL@%
  3826.  
  3827. Once the user has provided the correct downloadable font filename (the
  3828. installer does verify that the file actually exists before it accepts the
  3829. filename), the installer can set up the font for temporary download. If the
  3830. user ever reverts the font's status back to permanent, the installer
  3831. preserves the name using the "<PFM filename>=<downloadable font filename>"
  3832. convention. The installer also assumes that, since the user knowingly
  3833. reverted the font back to temporary status, the user removed whatever
  3834. utilities existed on the machine to download the permanent fonts.  %@NL@%
  3835.  
  3836.  
  3837.  
  3838.  
  3839.  
  3840.  
  3841. %@CR:C6A00090001 @%%@1@%%@AB@%Chapter 9  FINSTALL.DIR%@AE@%%@EH@%%@NL@%
  3842. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  3843.  
  3844. The Microsoft Windows printer font install directory file, FINSTALL.DIR,
  3845. provides a standard way for font manufacturers to describe the contents of a
  3846. font distribution package to the Printer Font Installer. The basic purpose
  3847. of this file is to link each downloadable font file to its corresponding
  3848. .PFM and screen font file.  %@NL@%
  3849.  
  3850. The printer font install directory file should be placed on the first disk
  3851. in a package of soft fonts, or its location should be clearly marked on the
  3852. disk that contains it.  %@NL@%
  3853.  
  3854. This chapter describes the format of the file. In this explanation, the
  3855. following syntax conventions are used:  %@NL@%
  3856.  
  3857. %@AB@%Convention%@AE@%                        %@AB@%Definition%@AE@%
  3858. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  3859. CAPS                              Indicates a reserved keyword required by
  3860.                                   the FINSTALL.DIR file.
  3861.  
  3862. [ ]                               Square brackets indicate that the 
  3863.                                   enclosed item is
  3864.                                   optional.
  3865.  
  3866. ,...                              Means that the description may be 
  3867.                                   repeated.
  3868.  
  3869. Comments, if included in FINSTALL.DIR, have the format:  %@NL@%
  3870.  
  3871. %@STUB@%    /* comment */%@NL@%
  3872.  
  3873. The comment must begin with /* and end with */. Comments may not be nested
  3874. (i.e., /* within a comment will be ignored, and the first occurrence of */
  3875. will end the comment).  %@NL@%
  3876.  
  3877. The FINSTALL.DIR file consists of two primary items: the logical drive
  3878. definition and the font family definition. A description of each of these
  3879. items follows.  %@NL@%
  3880.  
  3881.  
  3882. %@2@%%@CR:C6A00090002 @%%@AB@%9.1  Logical Drive Definition%@AE@%%@EH@%%@NL@%
  3883.  
  3884. The purpose of this command is to enable the font vendor to describe the
  3885. location of files that are not on the current disk. The DRIVE definition
  3886. must appear before it is used anywhere in the file. It is highly recommended
  3887. that a logical drive be defined for each floppy disk in the distribution
  3888. package, and that all files referenced be preceded by a logical drive ID.  %@NL@%
  3889.  
  3890. The format of the logical drive definition is as follows:  %@NL@%
  3891.  
  3892. %@AS@%  DRIVE id[:] = label-file [, "label-descriptor" ]%@AE@%
  3893.  
  3894. The following are descriptions of the fields in the definition:  %@NL@%
  3895.  
  3896. %@AB@%Field%@AE@%                             %@AB@%Description%@AE@%
  3897. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  3898. id                                The logical drive's identifier. The %@AI@%id%@AE@% 
  3899.                                   is used as a drive specifier to the 
  3900.                                   filename. For example:
  3901.  
  3902.                                   DRIVE fontlib1: = fontlib1.lbl, "Font 
  3903.                                   Library disk #1"
  3904.  
  3905.                                   sets up a logical drive, fontlib1.
  3906.  
  3907. label-file                        The file for which the Printer Font 
  3908.                                   Installer will look. The label file must
  3909.                                   use the .LBL file extension (for an 
  3910.                                   explanation, see Section 9.3, 
  3911.                                   "Installing Without the FINSTALL.DIR 
  3912.                                   File."
  3913.  
  3914.                                   When a filename is referenced as 
  3915.                                   FONTLIB1:
  3916.                                   CN010RPN.USP, the Printer Font Installer
  3917.                                   will look for the file FONTLIB1.LBL. If 
  3918.                                   present, the installer will load 
  3919.                                   CN010RPN.USP. If not present, it will 
  3920.                                   prompt the user, for example:
  3921.  
  3922.                                   Please place Font Library disk #1 into 
  3923.                                   drive A:
  3924.  
  3925.                                   After the user clicks OK on the prompt 
  3926.                                   (assuming the disks have been switched),
  3927.                                   the installer will again look for 
  3928.                                   FONTLIB1.LBL and, if present, will load 
  3929.                                   CN010RPN.USP. If not present, the 
  3930.                                   installer will repeat the prompt until 
  3931.                                   the user has inserted the correct disk.
  3932.  
  3933. "label-descriptor"                A general description of the floppy disk.
  3934.                                   This argument is optional. If not 
  3935.                                   present, the Printer Font
  3936.                                   Installer will prompt:
  3937.  
  3938.                                   Please place fontlib1 into drive A:
  3939.  
  3940.                                   The installer uses the name of the label
  3941.                                   file as the descriptor string. Quotes 
  3942.                                   around the description are required.
  3943.  
  3944.  
  3945. %@2@%%@CR:C6A00090003 @%%@AB@%9.2  Font Family Definition%@AE@%%@EH@%%@NL@%
  3946.  
  3947. The format of the font family definition is as follows:  %@NL@%
  3948.  
  3949. %@AS@%  FAMILY [ "family-name" ] {
  3950. %@AS@%   aspect-ratio = "description", screen-font-file
  3951. %@AS@%   "font-description" = orient, [ download-file ] [, PFM-file ]
  3952. %@AS@%   }%@AE@%
  3953.  
  3954. Where:  %@NL@%
  3955.  
  3956. The first line is the format for specifying a screen font file. The second
  3957. line is the format for specifying a downloadable font file. Both of these
  3958. lines can be repeated or eliminated.  %@NL@%
  3959.  
  3960. The following are descriptions of the fields in the definition:  %@NL@%
  3961.  
  3962. %@AB@%Field%@AE@%                             %@AB@%Description%@AE@%
  3963. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  3964. FAMILY                            The FAMILY keyword groups together a 
  3965.                                   list of downloadable files and their 
  3966.                                   .PFM files to their corresponding screen
  3967.                                   font files. Each subentry, %@AI@%aspect- ratio%@AE@%
  3968.                                   = and %@AI@%font-description%@AE@%=, may appear many
  3969.                                   times and in any order within the braces
  3970.                                   { }.
  3971.  
  3972. "family-name"                     A general description of the font family.
  3973.                                   Quotes around the "family-name" field 
  3974.                                   are required.
  3975.  
  3976. aspect-ratio                      The beginning of a screen font 
  3977.                                   definition. Its form is as follows:
  3978.  
  3979.                                   screen-width-in-lines/inch
  3980.                                   : screen-depth-in-lines/inch,...
  3981.  
  3982.                                   Notice that both the aspect ratio and 
  3983.                                   the screen resolution are built into the
  3984.                                   aspect-ratio field. Examples of valid 
  3985.                                   fields are as follows:
  3986.  
  3987.                                   ■ 72:72, 96:96 (VGA), 108:108, 120:120 
  3988.                                   (8514/a), and 144:144 for 1:1 screens at
  3989.                                   different resolutions
  3990.  
  3991.                                   ■ 96:72 for the IBM Enhanced Graphics 
  3992.                                   Adapter
  3993.  
  3994.                                   ■ 96:48 for the IBM Color Graphics 
  3995.                                   Adapter
  3996.  
  3997.                                   Multiple aspect ratios may be listed in 
  3998.                                   one aspect-ratio field, separated by 
  3999.                                   commas. For example, 72:72, 96:96 = 
  4000.                                   would be a valid aspect-ratio 
  4001.                                   specification.
  4002.  
  4003. %@AB@%Field%@AE@%                             %@AB@%Description%@AE@%
  4004. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  4005.                                   If the installer installs fonts on a 
  4006.                                   display device with no matching 
  4007.                                   resolution, but with matching aspect 
  4008.                                   ratios, then the installer chooses the 
  4009.                                   aspect-ratio field whose resolution is 
  4010.                                   less than or equal to the desired 
  4011.                                   resolution. (If there is no resolution 
  4012.                                   less than or equal to the desired 
  4013.                                   resolution, then it chooses the lowest 
  4014.                                   resolution.) If there is no screen font 
  4015.                                   with a matching aspect ratio, then no 
  4016.                                   screen fonts are loaded.
  4017.  
  4018. "description"                     The "descriptive-text" string used to 
  4019.                                   describe the screen font when it was 
  4020.                                   compiled as a resource. That is, when 
  4021.                                   the screen font was made, a special 
  4022.                                   entry in a Windows .DEF file was made 
  4023.                                   for the font in the form:
  4024.  
  4025.                                   DESCRIPTION FONTRES FontTypeList : 
  4026.                                   "descriptive-text"
  4027.  
  4028.                                   The "descriptive-text" string from the 
  4029.                                   .DEF file should be repeated for the 
  4030.                                   "description" field in the FINSTALL.DIR 
  4031.                                   file. If you are unsure of the string, 
  4032.                                   then use the Windows Control Panel to 
  4033.                                   load the screen font. In the WIN.INI 
  4034.                                   file, examine the section labeled 
  4035.                                   [FONTS]. Whatever you see to the left of
  4036.                                   the equal sign (=) for your screen font 
  4037.                                   is the string that should appear in the 
  4038.                                   "description" field.
  4039.  
  4040.                                   Examples of "description" fields are as 
  4041.                                   follows:
  4042.  
  4043.                                   ■ "Courier 8,10,12 (Set #3)"
  4044.  
  4045.                                   ■ "Roman (Set #1)"
  4046.  
  4047.                                   Quotes around the "description" field 
  4048.                                   are required.
  4049.  
  4050. screen-font-file                  The name and location of the screen font
  4051.                                   file. If you use a logical drive as part
  4052.                                   of the name, then you guarantee that the
  4053.                                   installer will be able to find the file 
  4054.                                   (i.e., it will prompt the user to change
  4055.                                   disks if the incorrect disk is in drive 
  4056.                                   A). Also, the path should be included in
  4057.                                   the filename if it is not in the root 
  4058.                                   directory on the disk.
  4059.  
  4060. %@AB@%Field%@AE@%                             %@AB@%Description%@AE@%
  4061. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  4062. "font-description"                The name that is listed in the 
  4063.                                   installer's list box. It should include 
  4064.                                   the following:
  4065.  
  4066.                                   ■ Exact face name
  4067.  
  4068.                                   ■ Point size (abbreviating "point" to 
  4069.                                   "pt" is recommended)
  4070.  
  4071.                                   ■ "bold" if the font is a bold face
  4072.  
  4073.                                   ■ "italic" if the font is italic face
  4074.  
  4075.                                   Examples of "font-description" strings 
  4076.                                   are as
  4077.                                   follows:
  4078.  
  4079.                                   ■ "Tms Rmn 10pt"
  4080.  
  4081.                                   ■ "Helv 14pt bold"
  4082.  
  4083.                                   ■ "Courier 8pt bold italic"
  4084.  
  4085.                                   Quotes around the "font-description" 
  4086.                                   string are
  4087.                                   required.
  4088.  
  4089. orient                            The font's orientation (portrait or 
  4090.                                   landscape). %@AI@%Orient%@AE@% is either P (or p) 
  4091.                                   for portrait orientation or L (or l) for
  4092.                                   landscape orientation. PL or LP may be 
  4093.                                   used to indicate either orientation.
  4094.  
  4095. download-file                     The name and location of the 
  4096.                                   downloadable font file. If you use a 
  4097.                                   logical drive as part of the name, then 
  4098.                                   you guarantee that the installer will be
  4099.                                   able to find the file (i.e., it will 
  4100.                                   prompt the user to change disks if the 
  4101.                                   incorrect disk is in drive A). Also, the
  4102.                                   path should be included in the filename 
  4103.                                   if it is not
  4104.                                   in the root directory on the disk. To 
  4105.                                   omit the downloadable file, use two 
  4106.                                   commas before the name of the PFM-file:
  4107.  
  4108.                                   "font-description" = orient,,PFM-file
  4109.  
  4110.                                   If the downloadable filename is omitted,
  4111.                                   the PFM-file name must be present.
  4112.  
  4113. PFM-file                          The name and location of the printer 
  4114.                                   font metrics file. If you use a logical 
  4115.                                   drive as part of the name, then you 
  4116.                                   guarantee that the installer will be 
  4117.                                   able to find the file (i.e., it will 
  4118.                                   prompt the user to change disks if the 
  4119.                                   incorrect disk is in drive A). Also, the
  4120.                                   path should be included in the filename 
  4121.                                   if it is not in the root directory on 
  4122.                                   the disk.
  4123.  
  4124. %@AB@%Field%@AE@%                             %@AB@%Description%@AE@%
  4125. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  4126.                                   If the PFM-file is omitted, then the 
  4127.                                   Printer Font Installer will attempt to 
  4128.                                   generate a .PFM file by reading metrics 
  4129.                                   from the downloadable font file. In 
  4130.                                   general, this approach is discouraged as
  4131.                                   the font manufacturer then relies on the
  4132.                                   driver's PFM Generator to correctly 
  4133.                                   build .PFM files. This is also an 
  4134.                                   inconvenience to the user who has to sit
  4135.                                   through the process of watching the 
  4136.                                   Printer Font Installer build the .PFM 
  4137.                                   files. Because we have a PFM Editor, you
  4138.                                   should be able to create a .PFM file 
  4139.                                   very easily.
  4140.  
  4141.                                   The font manufacturer can demonstrate 
  4142.                                   more control over the .PFM files and 
  4143.                                   provide a convenience to the user by 
  4144.                                   supplying the .PFM files on the 
  4145.                                   distribution disks.
  4146.  
  4147. CARTRIDGE                         %@AS@%CARTRIDGE {%@AE@%
  4148.                                   %@AS@%   aspect-ratio = "description", screen %@AE@%
  4149.                                   %@AS@%font-file%@AE@%
  4150.                                   %@AS@%   "cartridge title" = PCM-file%@AE@%
  4151.                                   %@AS@%   }%@AE@%
  4152.  
  4153.                                   This defines an external cartridge for 
  4154.                                   installation. 
  4155.  
  4156.                                   Where: 
  4157.  
  4158.                                   The aspect-ratio, "description", and 
  4159.                                   screen-font-file are the same as for 
  4160.                                   soft fonts. 
  4161.  
  4162.                                   The "cartridge title" is the title of a 
  4163.                                   cartridge that can be installed. This 
  4164.                                   title will appear in the installer's 
  4165.                                   list box. 
  4166.  
  4167.                                   Both of these lines can be repeated or 
  4168.                                   eliminated. 
  4169.  
  4170.                                   The PCM-file is the file containing the 
  4171.                                   cartridge information (the collection of
  4172.                                   PFMs). This file can also include a 
  4173.                                   label.
  4174.  
  4175.  
  4176. %@2@%%@CR:C6A00090004 @%%@AB@%9.3  Installing Without the FINSTALL.DIR File%@AE@%%@EH@%%@NL@%
  4177.  
  4178. If there is no printer font directory file, the installer performs the
  4179. following actions:  %@NL@%
  4180.  
  4181.  
  4182.   ■   If a file on the disk exists with the .LBL extension, the installer
  4183.       assumes the FINSTALL.DIR file is on another disk. It prompts the user
  4184.       to switch disks, while allowing the user the option to read the disk
  4185.       without the directory file.%@NL@%
  4186.  
  4187.   ■   If there is no .LBL file or the user chooses the first option, the
  4188.       installer assumes the directory file does not exist. It then scans the
  4189.       disk looking for downloadable font files.%@NL@%
  4190.  
  4191.  
  4192. When the installer has to scan the disk for soft fonts, it opens each file
  4193. on the disk and looks for the header of a downloadable font file. If it
  4194. finds the header, it derives the font name and point size, and displays this
  4195. to the user in the list box of soft fonts available for installation. When
  4196. the font is installed, the installer will generate a .PFM file from the
  4197. downloadable font file. Without the FINSTALL.DIR file, it will ignore any
  4198. .PFM files already on the disk.  %@NL@%
  4199.  
  4200.  
  4201. %@2@%%@CR:C6A00090005 @%%@AB@%9.4  Sample FINSTALL.DIR File%@AE@%%@EH@%%@NL@%
  4202.  
  4203. %@AS@%  /* Acme Corporation's font package.
  4204. %@AS@%   *
  4205. %@AS@%   * This package consists of two floppy disks, one
  4206. %@AS@%   * containing the Tms Rmn soft font set, the other
  4207. %@AS@%   * containing the Helv soft font set.
  4208. %@AS@%   */%@AE@%
  4209.  
  4210. %@AS@%  /* Logical drives
  4211. %@AS@%   */
  4212. %@AS@%  DRIVE TR1: = TRSET1.LBL, "Tms Rmn set (disk 1 of 2)"
  4213. %@AS@%  DRIVE HV1: = HVSET1.LBL, "Helv set (disk 2 of 2)"%@AE@%
  4214.  
  4215. %@AS@%  /* Tms Rmn set
  4216. %@AS@%   */
  4217. %@AS@%  FAMILY "Tms Rmn" {
  4218. %@AS@%    /* screen fonts */
  4219. %@AS@%    1:1 = "Acme Tms 1:1", TR1:TR11.FON
  4220. %@AS@%    4:3 = "Acme Tms 4:3", TR1:TR43.FON
  4221. %@AS@%    2:1 = "Acme Tms 2:1", TR1:TR21.FON%@AE@%
  4222.  
  4223. %@AS@%  /* printer fonts */
  4224. %@AS@%    "Tms Rmn   6pt"        = P,TR1:TR060RPN.USP,TR1:TR060RPP.PFM
  4225. %@AS@%    "Tms Rmn   6pt"        = L,TR1:TR060RPN.USL,TR1:TR060RPL.PFM
  4226. %@AS@%    "Tms Rmn   6pt bold"   = P,TR1:TR060BPN.USP,TR1:TR060BPP.PFM
  4227. %@AS@%    "Tms Rmn   6pt bold"   = L,TR1:TR060BPN.USL,TR1:TR060BPL.PFM
  4228. %@AS@%    .
  4229. %@AS@%    .
  4230. %@AS@%    .
  4231. %@AS@%    "Tms Rmn  30pt bold"   = L,TR1:TR300BPN.USL,TR1:TR300BPL.PFM
  4232. %@AS@%    "Tms Rmn  30pt italic" = P,TR1:TR300IPN.USP,TR1:TR300IPP.PFM
  4233. %@AS@%    "Tms Rmn  30pt italic" = L,TR1:TR300IPN.USL,TR1:TR300IPL.PFM
  4234. %@AS@%    }%@AE@%
  4235.  
  4236. %@AS@%  /* Helv set
  4237. %@AS@%   */
  4238. %@AS@%  FAMILY "Helv" {
  4239. %@AS@%    /* screen fonts */
  4240. %@AS@%    1:1 = "Acme Helv 1:1", HV1:HV11.FON
  4241. %@AS@%    4:3 = "Acme Helv 4:3", HV1:HV43.FON
  4242. %@AS@%    2:1 = "Acme Helv 2:1", HV1:HV21.FON%@AE@%
  4243.  
  4244. %@AS@%  /* printer fonts */
  4245. %@AS@%    "Helv   6pt"           = P,HV1:HV060RPN.USP,HV1:HV060RPP.PFM
  4246. %@AS@%    "Helv   6pt"           = L,HV1:HV060RPN.USL,HV1:HV060RPL.PFM
  4247. %@AS@%    "Helv   6pt bold"      = P,HV1:HV060BPN.USP,HV1:HV060BPP.PFM
  4248. %@AS@%    "Helv   6pt bold"      = L,HV1:HV060BPN.USL,HV1:HV060BPL.PFM
  4249. %@AS@%    .
  4250. %@AS@%    .
  4251. %@AS@%    .
  4252. %@AS@%    "Helv  30pt bold"      = L,HV1:HV300BPN.USL,HV1:HV300BPL.PFM
  4253. %@AS@%    "Helv  30pt italic"    = P,HV1:HV300IPN.USP,HV1:HV300IPP.PFM
  4254. %@AS@%    "Helv  30pt italic"    = L,HV1:HV300IPN.USL,HV1:HV300IPL.PFM
  4255. %@AS@%    }%@AE@%
  4256.  
  4257. %@AS@%  /* Cartridge version
  4258. %@AS@%   */
  4259. %@AS@%  CARTRIDGE {
  4260. %@AS@%    /* screen fonts */
  4261. %@AS@%    1:1 = "Acme Helv 1:1", HV1:HV11.FON
  4262. %@AS@%    4:3 = "Acme Helv 4:3", HV1:HV43.FON
  4263. %@AS@%    2:1 = "Acme Helv 2:1", HV1:HV21.FON
  4264. %@AS@%    1:1 = "Acme Tms 1:1", TR1:TR11.FON
  4265. %@AS@%    4:3 = "Acme Tms 4:3", TR1:TR43.FON
  4266. %@AS@%    2:1 = "Acme Tms 2:1", TR1:TR21.FON  %@AE@%
  4267.  
  4268. %@AS@%  /* cartridge containing the fonts */
  4269. %@AS@%   "Acme Font Ser" = TR1:ACMECART.PCM
  4270. %@AS@%   } %@AE@%
  4271.  
  4272.  
  4273.  
  4274.  
  4275.  
  4276.  
  4277. %@CR:C6A00100001 @%%@1@%%@AB@%Chapter 10  Developers' Tools%@AE@%%@EH@%%@NL@%
  4278. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  4279.  
  4280. This chapter presents the features of the Microsoft Windows Printer Font
  4281. Installer that are not in Part 1, "Fonts." These features were specifically
  4282. put in the installer to help font vendors and technical support specialists.
  4283. %@NL@%
  4284.  
  4285.  
  4286. %@2@%%@CR:C6A00100002 @%%@AB@%10.1  Building an FINSTALL.DIR File%@AE@%%@EH@%%@NL@%
  4287.  
  4288. The installer will build an FINSTALL.DIR file for the fonts listed in the
  4289. %@AI@%left%@AE@% list box of the installer dialog. The developer should hold down the
  4290. CTRL and SHIFT keys while clicking the mouse on the "Exit" button. The
  4291. installer will prompt the user for the name and path of the FINSTALL.DIR
  4292. file. If a file by the same name already exists, the installer will prompt
  4293. to replace the file.  %@NL@%
  4294.  
  4295. This feature has several uses:  %@NL@%
  4296.  
  4297.  
  4298.   ■   To preserve the soft font and cartridge entries when the user wants to
  4299.       reinstall Windows.%@NL@%
  4300.  
  4301.   ■   To expedite moving fonts to another machine.%@NL@%
  4302.  
  4303.   ■   As a starter file for developers or power users who want to set up a
  4304.       distribution disk of fonts.%@NL@%
  4305.  
  4306.  
  4307. This feature is primarily intended to be used by technical support
  4308. specialists who are directing users to perform certain operations. A user
  4309. may be advised to erase part or all of the contents of his or her machine
  4310. and start over. This feature is very useful in preventing the loss of soft
  4311. font information.  %@NL@%
  4312.  
  4313. Chapter 12, "Installer Scenarios," provides sample uses of this feature.  %@NL@%
  4314.  
  4315.  
  4316. %@2@%%@CR:C6A00100003 @%%@AB@%10.2  Adding Fonts%@AE@%%@EH@%%@NL@%
  4317.  
  4318. Developers can gain access to an advanced "Add fonts..." dialog by holding
  4319. down the CTRL and SHIFT keys when clicking the mouse on the "Add fonts..."
  4320. button. This dialog gives developers the following options:  %@NL@%
  4321.  
  4322.  
  4323.   ■   Specify the path from which the installer should read fonts.%@NL@%
  4324.  
  4325.   ■   Rename the FINSTALL.DIR file. %@NL@%
  4326.  
  4327.   ■   Indicate if an error file should be written and specify its name.%@NL@%
  4328.  
  4329.  
  4330. The first item is available to users via the normal "Add fonts..." dialog.
  4331. The other two items are intended to be used by font vendors or power users
  4332. setting up FINSTALL.DIR files for distribution.  %@NL@%
  4333.  
  4334. Before parsing the FINSTALL.DIR file, the installer will report the screen
  4335. aspect ratio. The installer will classify the screen type as either CGA
  4336. (2:1), EGA(4:3), or VGA(1:1). It uses the same algorithm to classify the
  4337. screen fonts listed in the FINSTALL.DIR file. The fonts that match the
  4338. category in which the screen was classified would be loaded by the
  4339. installer.  %@NL@%
  4340.  
  4341. The formula the installer uses to classify screens is as follows:  %@NL@%
  4342.  
  4343.  
  4344.   1.  Compute the screen width in lines-per-inch (horizontal resolution
  4345.       divided by horizontal size converted from millimeters to inches):%@NL@%
  4346.  
  4347. %@STUB@%      width = (%@AB@%GetDeviceCaps%@AE@%(HORZ_RES) * 25) / %@AB@%GetDeviceCaps%@AE@%(HORZSIZE)%@NL@%
  4348.  
  4349.   2.  Compute the screen height in lines-per-inch (vertical resolution
  4350.       divided by vertical size converted from millimeters to inches):%@NL@%
  4351.  
  4352. %@STUB@%      height = (%@AB@%GetDeviceCaps%@AE@%(VERT_RES) * 25) / %@AB@%GetDeviceCaps%@AE@%(VERTSIZE)%@NL@%
  4353.  
  4354.   3.  Take the inverse ratio of width to height:%@NL@%
  4355.  
  4356. %@STUB@%      ratio = (height * 10000) / width%@NL@%
  4357.  
  4358.   4.  Categorize the screen type based upon the ratio:
  4359. %@TH:   4   246 01 31 45 @%
  4360. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  4361. 0 to 6249                      CGA (2:1)
  4362. 6250 to 9374                   EGA (4:3)
  4363. 9375 and above                 VGA (1:1)
  4364. %@TE:   4   246 01 31 45 @%
  4365.  
  4366. %@NL@%
  4367.  
  4368.  
  4369. It is highly recommended that font vendors use the advanced "Add fonts..."
  4370. dialog to verify that there are no syntax errors in the FINSTALL.DIR file.
  4371. If the installer finds errors in the FINSTALL.DIR file, it will write error
  4372. messages in the FINSTALL.ERR file. The messages will be of the form:  %@NL@%
  4373.  
  4374. line<line-number>,near character<character position>:<error message>  %@NL@%
  4375.  
  4376. The installer also displays a dialog indicating that errors were found and
  4377. written to the file.  %@NL@%
  4378.  
  4379.  
  4380.  
  4381.  
  4382.  
  4383.  
  4384. %@CR:C6A00110001 @%%@1@%%@AB@%Chapter 11  .PFM Generator%@AE@%%@EH@%%@NL@%
  4385. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  4386.  
  4387. This chapter describes the Microsoft Windows Printer Font Installer's .PFM
  4388. file generator. When the installer scans a disk for soft fonts and there is
  4389. no FINSTALL.DIR file, it assumes it will have to build .PFM files from the
  4390. downloadable font files. It reads the header from the font file plus the
  4391. widths of each individual character and uses that information to build the
  4392. .PFM file.  %@NL@%
  4393.  
  4394. Please notice that when the installer scans a disk for fonts and there is no
  4395. FINSTALL.DIR file, it will ignore any .PFM files already on the disk and
  4396. will attempt to generate .PFM files from the font files. It will, however,
  4397. recognize cartridge .PCM files.  %@NL@%
  4398.  
  4399.  
  4400. %@2@%%@CR:C6A00110002 @%%@AB@%11.1  Installer PFM Versus Vendor-Supplied PFM%@AE@%%@EH@%%@NL@%
  4401.  
  4402. It is highly recommended that font vendors provide the .PFM files. The
  4403. installer will supply a generic .PFM file that contains width table
  4404. information and a guess at the font name. The .PFM files provided by the
  4405. vendor are guaranteed to contain the correct name and may include pair-kern
  4406. tables. The .PFM files from the vendor will more accurately represent the
  4407. font and give the vendor a competitive advantage over fonts from other
  4408. vendors. We have included the PFM Editor as a tool now for generating or
  4409. editing .PFM files. See Chapter 3, "The PFM Editor," in Part 1, "Fonts," for
  4410. a complete description of this new tool.  %@NL@%
  4411.  
  4412.  
  4413. %@2@%%@CR:C6A00110003 @%%@AB@%11.2  File Naming Scheme%@AE@%%@EH@%%@NL@%
  4414.  
  4415. The installer builds the .PFM filename as follows:  %@NL@%
  4416.  
  4417. %@AB@%Character%@AE@%                         %@AB@%Definition%@AE@%
  4418. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  4419. 1, 2                              First two characters from the font 
  4420.                                   filename
  4421.  
  4422. 3                                 P, L, or X for portrait, landscape, or 
  4423.                                   both orientations
  4424.  
  4425. 4                                 B, R, I, or E for bold, roman, italic, 
  4426.                                   or bold/italic
  4427.                                   (enhanced)
  4428.  
  4429. 5, 6, 7                           Point size in points
  4430.  
  4431. 8                                 Magic number
  4432.  
  4433. The "magic number" is used by the installer to ensure that the filename is
  4434. unique. It starts out at 0. If a file already exists by that name, it is
  4435. incremented to 1. The installer continues to increment the number to 9, then
  4436. A through Z. If it fails to find a unique filename out of the 36
  4437. possibilities, then it will fail to build the .PFM file and report a "Cannot
  4438. build PFM file" error message.  %@NL@%
  4439.  
  4440.  
  4441. %@2@%%@CR:C6A00110004 @%%@AB@%11.3  Regenerating .PFM Files%@AE@%%@EH@%%@NL@%
  4442.  
  4443. This section deals with situations in which the user is re-installing
  4444. existing fonts onto themselves without the aid of the FINSTALL.DIR file. The
  4445. installer contains a protection mechanism that prevents it from generating
  4446. duplicate .PFM files. There are two potential situations:  %@NL@%
  4447.  
  4448.  
  4449.   1.  The user re-installs fonts with .PFM files that were initially
  4450.       generated by the installer.%@NL@%
  4451.  
  4452.   2.  The user re-installs fonts that were initially provided by the font
  4453.       vendor (i.e., either on the distribution disks or built by a utility
  4454.       provided by the font vendor).%@NL@%
  4455.  
  4456.  
  4457. To "re-install" fonts, the user pulls up the Printer Font Installer, selects
  4458. "Add fonts...," and directs the installer to read font information from the
  4459. directory containing already installed fonts. Then the user installs fonts
  4460. into the same directory. The installer will prompt the user if fonts should
  4461. be replaced. If the user responds "yes," the installer proceeds to replace
  4462. every font with itself.  %@NL@%
  4463.  
  4464. As described in the previous section, the installer contains a mechanism
  4465. that guarantees it will find a unique name for each .PFM file. In this
  4466. situation, the installer would give a unique name to a .PFM file that was a
  4467. duplicate of an existing .PFM file. For example, suppose the first time a
  4468. user installed a font, the installer generated a .PFM filename XYZ0.PFM.
  4469. When the user re-installed the font, the installer would generate a second
  4470. identical .PFM file named XYZ1.PFM.  %@NL@%
  4471.  
  4472. To prevent duplicate .PFM files on the disk, the installer contains a
  4473. protection mechanism. If the "magic number" in the .PFM filename is not 0,
  4474. then the installer compares the contents of the .PFM file to the other .PFM
  4475. files sharing the same name. If it finds a duplicate, it erases the .PFM
  4476. file it just built and uses the already existing .PFM file.  %@NL@%
  4477.  
  4478. This mechanism prevents the installer from placing duplicate .PFM files on
  4479. the disk. However, it does not take care of the problem when .PFM files were
  4480. originally supplied by the font vendor.  %@NL@%
  4481.  
  4482. If the user originally installs fonts provided by a font vendor and then
  4483. re-installs without use of an FINSTALL.DIR file, the installer will %@AI@%replace%@AE@%
  4484. the vendorsupplied .PFM files with its own generated .PFM files. It does not
  4485. remove the .PFM files from disk; rather it adds its own .PFM files and uses
  4486. them. Because the installer's PFM generator is not as accurate as the font
  4487. vendor's .PFM files, the installer may actually end up %@AI@%renaming%@AE@% the fonts,
  4488. which causes confusion for the user.  %@NL@%
  4489.  
  4490. Therefore, the user should never re-install soft fonts from and to the same
  4491. directory without the aid of an FINSTALL.DIR file. Because the installer
  4492. contains the ability to generate automatically an FINSTALL.DIR file of the
  4493. already loaded fonts, there really is no reason for re-installing fonts
  4494. without the use of an FINSTALL.DIR file.  %@NL@%
  4495.  
  4496. Section 12.3, "Recovering Soft Fonts From a WIN.INI Change," presents how
  4497. the user would preserve the installed fonts using an FINSTALL.DIR file.  %@NL@%
  4498.  
  4499.  
  4500. %@2@%%@CR:C6A00110005 @%%@AB@%11.4  PFM Data From Font Data%@AE@%%@EH@%%@NL@%
  4501.  
  4502. The installer's PFM generator derives the .PFM file from the data in the
  4503. downloadable font file. The structure of the .PFM file is documented in Part
  4504. 1, "Fonts." The following sections list where the data comes from for each
  4505. field in the .PFM file structures.  %@NL@%
  4506.  
  4507.  
  4508. %@3@%%@CR:C6A00110006 @%%@AB@%11.4.1  PFM Header%@AE@%%@EH@%%@NL@%
  4509.  
  4510. The installer derives the PFM header from the download file as follows:  %@NL@%
  4511.  
  4512. %@TH:  85  3197 02 34 44 @%
  4513. Field                             Computation
  4514. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  4515. %@AB@%dfVersion%@AE@%                         256
  4516.  
  4517. %@AB@%dfSize%@AE@%                            Size of file
  4518.  
  4519. %@AB@%dfType%@AE@%                            128
  4520.  
  4521. %@AB@%dfPoints%@AE@%                          Height of the font in points (height from 
  4522.                                   header * 72 / 1200)
  4523.  
  4524. %@AB@%dfVertRes%@AE@%                         300
  4525.  
  4526. %@AB@%dfHorizRes%@AE@%                        300
  4527.  
  4528. %@AB@%dfAscent%@AE@%                          Baseline position from font header
  4529.  
  4530. %@AB@%dfInternalLeading%@AE@%                 (Cell height - height + 2) / 4 from font 
  4531.                                   header
  4532.  
  4533. %@AB@%dfExternalLeading%@AE@%                 (height / 4) - baseline from font header
  4534.  
  4535. %@AB@%dfItalic%@AE@%                          Set if the style byte in the header = 1
  4536.  
  4537. %@AB@%dfUnderline%@AE@%                       0
  4538.  
  4539. %@AB@%dfStrikeOut%@AE@%                       0
  4540.  
  4541. %@AB@%dfWeight%@AE@%                          Derived from stroke weight (see table on 
  4542.                                   following page)
  4543.  
  4544. %@AB@%dfCharSet%@AE@%                         Based upon HP symbol set (see table on 
  4545.                                   following page)
  4546.  
  4547. %@AB@%dfPixWidth%@AE@%                        If variable width
  4548.  
  4549. %@AB@%dfPixHeight%@AE@%                       Cell height from the font header
  4550.  
  4551. %@AB@%dfPitchAndFamily%@AE@%                  Pitch bit is set if fixed pitch
  4552.  
  4553. %@AB@%dfAvgWidth%@AE@%                        Average of all the character widths 
  4554.                                   (cursor move)
  4555.  
  4556. %@AB@%dfMaxWidth%@AE@%                        Maximum of all the character widths 
  4557.                                   (cursor move)
  4558.  
  4559. %@AB@%dfFirstChar%@AE@%                       First character in the font file
  4560.  
  4561. %@AB@%dfLastChar%@AE@%                        Last character in the font file
  4562.  
  4563. %@AB@%dfDefaultChar%@AE@%                     127 - first character
  4564.  
  4565. %@AB@%dfBreakChar%@AE@%                       32 - first character
  4566.  
  4567. %@AB@%dfWidthBytes%@AE@%                      0
  4568.  
  4569. %@AB@%dfDevice%@AE@%                          Offset from beginning of file to device 
  4570.                                   string "PCL / HP LaserJet"
  4571.  
  4572. %@AB@%dfFace%@AE@%                            Offset from beginning of file to face name
  4573.  
  4574. %@AB@%dfBitsPointer%@AE@%                     0
  4575.  
  4576. %@AB@%dfBitsOffset%@AE@%                      0
  4577.  
  4578. %@AB@%dfCharOffset%@AE@%                      If variable pitch
  4579.  
  4580. %@AB@%dfSizeFields%@AE@%                      Size of this part of the PFM structure
  4581.  
  4582. %@AB@%dfExtMetricsOffset%@AE@%                Offset from beginning of file to 
  4583.                                   EXTTEXTMETRIC structure
  4584.  
  4585. %@AB@%dfExtentTable%@AE@%                     0
  4586.  
  4587. %@AB@%dfOriginTable%@AE@%                     0
  4588.  
  4589. %@AB@%dfPairKernTable%@AE@%                   0
  4590.  
  4591. %@AB@%dfTrackKernTable%@AE@%                  0
  4592.  
  4593. %@AB@%dfDriverInfo%@AE@%                      Offset from beginning of file to 
  4594.                                   DRIVERINFO (driver-specific) structure
  4595.  
  4596. %@AB@%dfReserved%@AE@%                        0
  4597.  
  4598. %@TE:  85  3197 02 34 44 @%
  4599.  
  4600. The installer derives the Windows weight value from the weight value in the
  4601. font file header as follows:  %@NL@%
  4602.  
  4603. %@AB@%HP Weight%@AE@%                         %@AB@%Windows Weight%@AE@%
  4604. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  4605. -7                                100 (Thin)
  4606.  
  4607. -6                                100 (Thin)
  4608.  
  4609. -5                                200 (Extra light)
  4610.  
  4611. -4                                200 (Extra light)
  4612.  
  4613. -3                                300 (Light)
  4614.  
  4615. -2                                300 (Light)
  4616.  
  4617. -1                                400 (Normal
  4618.  
  4619. 0                                 400 (Normal)
  4620.  
  4621. 1                                 500 (Medium)
  4622.  
  4623. 2                                 600 (Semi-bold)
  4624.  
  4625. 3                                 700 (Bold)
  4626.  
  4627. 4                                 700 (Bold)
  4628.  
  4629. 5                                 800 (Extra bold)
  4630.  
  4631. 6                                 800 (Extra bold)
  4632.  
  4633. 7                                 900 (Heavy)
  4634.  
  4635. The installer determines the Windows character set (%@AB@%dfCharSet%@AE@%) and the type
  4636. of translation (in the driver-specific structure, %@AB@%xtbl.xtSymbolSet%@AE@%) from the
  4637. symbol set field in the font file:  %@NL@%
  4638.  
  4639. %@TH:  13   827 02 15 23 38 @%
  4640. HP symbol set  Windows character set  Translation
  4641. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  4642. 8U (Roman-8)   0 (ANSI)               Roman-8
  4643. 0U (USASCII)   0 (ANSI)               USASCII
  4644. 11Q            0N (ECMA-94)           0 (ANSI)
  4645. 8M (Math-8)    180 (Math-8)           8-bit pass through
  4646. 15U (PI Font)  181 (PI Font)          8-bit pass through
  4647. 0B (LineDraw)  182 (LineDraw)         7-bit pass through
  4648. 4Q (PC Line)   183 (PC Line)          7-bit pass through
  4649. 0B (TaxLnDrw)  184 (Tax Line)         7-bit pass through
  4650. 1U (US Legal)  185 (US Legal)         7-bit pass through
  4651. %@AI@%all others%@AE@%     0 (ANSI)               7- or 8-bit pass through
  4652. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  4653. %@TE:  13   827 02 15 23 38 @%
  4654.  
  4655. For the generic case, the installer checks the font type byte in the font
  4656. header. If it is non-zero, the font uses an 8-bit pass through; if zero, the
  4657. font uses a 7-bit pass through.  %@NL@%
  4658.  
  4659.  
  4660. %@3@%%@CR:C6A00110007 @%%@AB@%11.4.2  EXTTEXTMETRIC Data Structure%@AE@%%@EH@%%@NL@%
  4661.  
  4662. The installer derives extended text metrics from the download header file as
  4663. follows:  %@NL@%
  4664.  
  4665. %@TH:  68  3107 02 34 44 @%
  4666. Field                             Computation
  4667. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  4668. %@AB@%etmSize%@AE@%                           Size of EXTTEXTMETRIC 
  4669.                                   structure
  4670.  
  4671. %@AB@%etmPointSize%@AE@%                      Cell Height *1440 / 300 from font file 
  4672.                                   header
  4673.  
  4674. %@AB@%etmOrientation%@AE@%                    2 if orientation byte set in header; 1 if 
  4675.                                   not
  4676.  
  4677. %@AB@%etmMasterHeight%@AE@%                   Cell height from font file header
  4678.  
  4679. %@AB@%etmMinScale%@AE@%                       %@AB@%etmMasterHeight%@AE@%
  4680.  
  4681. %@AB@%etmMaxScale%@AE@%                       %@AB@%etmMasterHeight%@AE@%
  4682.  
  4683. %@AB@%etmMasterUnits%@AE@%                    %@AB@%etmMasterHeight%@AE@%
  4684.  
  4685. %@AB@%etmCapHeight%@AE@%                      Baseline from header - d%@AB@%fInternalLeading%@AE@%
  4686.  
  4687. %@AB@%etmXHeight%@AE@%                        Top offset from character record for 'x'; 
  4688.                                   left offset if landscape font
  4689.  
  4690. %@AB@%etmLowerCaseAscent%@AE@%                Top offset from character record for 'd'; 
  4691.                                   left offset if landscape font
  4692.  
  4693. %@AB@%etmLowerCaseDescent%@AE@%               Character width - left offset from 
  4694.                                   character record for 'p'; height - top if 
  4695.                                   landscape font
  4696.  
  4697. %@AB@%etmSlant%@AE@%                          0
  4698.  
  4699. %@AB@%etmSuperScript%@AE@%                    %@AB@%etmCapHeight%@AE@% - %@AB@%etmXHeight%@AE@%
  4700.  
  4701. %@AB@%etmSubScript%@AE@%                      %@AB@%Cell height from header%@AE@%
  4702.  
  4703. %@AB@%etmSuperScriptSize%@AE@%                %@AB@%Cell height from header%@AE@%
  4704.  
  4705. %@AB@%etmSubScriptSize%@AE@%                  %@AB@%Cell height from header%@AE@%
  4706.  
  4707. %@AB@%etmUnderlineOffset%@AE@%                Top offset from character record for '_'; 
  4708.                                   left offset if landscape font
  4709.  
  4710. %@AB@%etmUnderlineWidth%@AE@%                 Character width from character 
  4711.                                   record for '_'; character height if 
  4712.                                   landscape font
  4713.  
  4714. %@AB@%etmDoubleUpperUnderlineOffset%@AE@%     %@AB@%etmUnderlineOffset%@AE@% + %@AB@%etmUnderlineWidth%@AE@% * 2
  4715.  
  4716. %@AB@%etmDoubleLowerUnderlineOffset%@AE@%     %@AB@%etmUnderlineOffset%@AE@%
  4717.  
  4718. %@AB@%etmDoubleUpperUnderlineWidth%@AE@%      %@AB@%etmUnderlineWidth%@AE@%
  4719.  
  4720. %@AB@%etmDoubleLowerUnderlineWidth%@AE@%      %@AB@%etmDoubleUpperUnderlineWidth%@AE@%
  4721.  
  4722. %@AB@%etmStrikeOutWidth%@AE@%                 Character width from record for '-'; 
  4723.                                   character height if landscape font
  4724.  
  4725. %@AB@%etmStrikeOutOffset%@AE@%                Left offset - %@AB@%etmStrikeOutWidth%@AE@% from 
  4726.                                   character record for '-'; top 
  4727.                                   offset - %@AB@%etmStrikeOutWidth%@AE@% if landscape 
  4728.                                   font
  4729.  
  4730. %@AB@%etmKernPairs%@AE@%                      0
  4731.  
  4732. %@AB@%etmKernTracks%@AE@%                     0
  4733.  
  4734. %@TE:  68  3107 02 34 44 @%
  4735.  
  4736.  
  4737. %@3@%%@CR:C6A00110008 @%%@AB@%11.4.3  Device-Specific Data Structure%@AE@%%@EH@%%@NL@%
  4738.  
  4739. The format of this structure is presented in Section 12.7, "Setting Up .PFM
  4740. Files for Resident and Cartridge Fonts."  %@NL@%
  4741.  
  4742. %@TH:  23   950 02 34 44 @%
  4743. Field                             Computation
  4744. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  4745. %@AB@%epSize%@AE@%                            Size of DRIVERINFO structure
  4746.  
  4747. %@AB@%epVersion%@AE@%                         1
  4748.  
  4749. %@AB@%epMemUsage%@AE@%                        ((sum of all character widths + 7) >> 3) *
  4750.                                   height + 63, function from the %@AI@%HP %@AE@%
  4751.                                   %@AI@%Technical Reference Manual%@AE@%
  4752.  
  4753. %@AB@%epEscape%@AE@%                          0
  4754.  
  4755. %@AB@%xtbl.xtSymbolSet%@AE@%                  Based upon font symbol set (see HP symbol 
  4756.                                   set table in Section 11.4.1, "PFM Header")
  4757.  
  4758. %@AB@%xtbl.xtOffset%@AE@%                     0
  4759.  
  4760. %@AB@%xtbl.xtLen%@AE@%                        0
  4761.  
  4762. %@AB@%xtbl.xtFirstChar%@AE@%                  0
  4763.  
  4764. %@AB@%xtbl.xtLastChar%@AE@%                   0
  4765.  
  4766. %@TE:  23   950 02 34 44 @%
  4767.  
  4768.   %@NL@%
  4769.  
  4770.  
  4771.  
  4772.  
  4773.  
  4774.  
  4775. %@CR:C6A00120001 @%%@1@%%@AB@%Chapter 12  Installer Scenarios%@AE@%%@EH@%%@NL@%
  4776. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  4777.  
  4778. This chapter presents some sample uses of the Microsoft Windows Printer Font
  4779. Installer. It starts with recommendations for selecting printer and screen
  4780. fonts, then presents some "cookbook" approaches to performing certain tasks
  4781. with the Printer Font Installer.  %@NL@%
  4782.  
  4783. We assume that the reader understands how to use the Printer Font Installer
  4784. and has a basic understanding of MS-DOS. Help under the "Printer Font
  4785. Installer" dialog describes the user interface to the installer.  %@NL@%
  4786.  
  4787. We recommend that all technical support specialists also read this chapter.
  4788. %@NL@%
  4789.  
  4790.  
  4791. %@2@%%@CR:C6A00120002 @%%@AB@%12.1  Selecting Printer Fonts%@AE@%%@EH@%%@NL@%
  4792.  
  4793. Fonts take up disk space and printer memory. Planning which fonts are needed
  4794. and installing only those fonts can save disk space. Selecting fonts is a
  4795. highly subjective process. It requires making tradeoffs between document
  4796. design and computer memory, disk space, printer memory, and printing speed.
  4797. %@NL@%
  4798.  
  4799. The recommendations presented in this section and Section 12.2, "Selecting
  4800. Screen Fonts," are based upon experience gained from working with Windows
  4801. and soft fonts. The intent of these recommendations is to help you optimize
  4802. the amount of disk space and printer memory used by soft fonts. Some of the
  4803. recommendations indicate that you should not load certain variations of
  4804. fonts; you may want to experiment to determine if the additional expense in
  4805. print time and disk space is worth including these fonts.  %@NL@%
  4806.  
  4807. We recommend loading the typographic range of point sizes and limiting
  4808. documents to using these sizes. The typographic range is as follows:  %@NL@%
  4809.  
  4810. 6, 7, 8, 9, 10, 11, 12, 14, 18, 24, 30, 48, 60, 72  %@NL@%
  4811.  
  4812. Better yet, if you know exactly which sizes you normally use in a document,
  4813. load only those sizes. For example, a document may use only the following
  4814. point sizes of Helv:  %@NL@%
  4815.  
  4816. 11 point for body text 9 point for running headers, running footers, and
  4817. footnotes 14, 24, and 30 point bold for subheads and headlines  %@NL@%
  4818.  
  4819. By loading only these sizes, you reduce the number of fonts taking up disk
  4820. space.  %@NL@%
  4821.  
  4822. We recommend generating normal and italic for all point sizes, and bold for
  4823. point sizes equal to and above 14 points. The PCL driver has the capability
  4824. to simulate bold text. It will not look the same as the true bold face, so
  4825. you may want to experiment first (e.g., print a document with bold type but
  4826. with no bold face loaded and, then, load the bold face and reprint the
  4827. document). Normally, however, the driver-simulated bold face is adequate for
  4828. the small point sizes.  %@NL@%
  4829.  
  4830. To save on even more space, we recommend that you load bold %@AI@%only%@AE@% for the
  4831. larger sizes (i.e., 24 points and above). The assumption is that you will
  4832. only use bold sizes for headlines.  %@NL@%
  4833.  
  4834. Avoid loading bold italic for a font. Bold italic consumes disk space and
  4835. printer memory and, because bold italic is rarely used, it does not warrant
  4836. the space it requires. As an alternative, the driver will simulate bold
  4837. italic by synthetically bolding the italic face.  %@NL@%
  4838.  
  4839. Character sets can make a big difference in the amount of disk space and
  4840. printer memory used by a font. If the document never uses accented
  4841. characters or special symbols like the bullet (i.e., a centered period) and
  4842. copyright, we recommend using the USASCII character set. If the document
  4843. requires these characters, use the Windows ANSI, ECMA-94, or Roman-8
  4844. character sets (listed in order of preference, depending upon which sets you
  4845. have access to).  %@NL@%
  4846.  
  4847. Fonts in the USASCII character set contain a little more than half the
  4848. number of characters contained in the Windows ANSI, ECMA-94, and Roman-8
  4849. character sets. By selecting USASCII, you effectively half the amount of
  4850. disk space and printer memory used by the font. We recommend using, in order
  4851. of preference, Windows ANSI, ECMA-94, or Roman-8 for point sizes below 14
  4852. points and USASCII for point sizes 14 points and above. Figure 12.1
  4853. summarizes these recommendations.  %@NL@%
  4854.  
  4855. %@AU@%(This figure may be found in the printed book).%@AE@%%@NL@%
  4856.  
  4857.  
  4858. %@2@%%@CR:C6A00120003 @%%@AB@%12.2  Selecting Screen Fonts%@AE@%%@EH@%%@NL@%
  4859.  
  4860. Selecting screen fonts is considerably different from selecting printer
  4861. fonts. The selection of screen font sizes should not be based upon the
  4862. selected printer font sizes. It does not make sense to build one
  4863. corresponding screen font for every printer font for the following reasons:
  4864. %@NL@%
  4865.  
  4866.  
  4867.   ■   Screen fonts in Windows are sized and modified by the screen driver.
  4868.       The screen driver can derive normal, bold, italic, and bold italic
  4869.       variations from one screen font.%@NL@%
  4870.  
  4871.   ■   Screen fonts are selected by way of a generic selection process
  4872.       controlled by the application and the screen driver. One cannot assume
  4873.       that a screen font specifically targeted for a printer font will be
  4874.       used to display that font.%@NL@%
  4875.  
  4876.   ■   Some applications allow the user to see the font at different views
  4877.       (e.g., "fit in window," 100%, and 200%). A screen font should be
  4878.       provided for each view.%@NL@%
  4879.  
  4880.   ■   Most important, screen fonts take dynamic memory away from
  4881.       applications, thus slowing the overall performance of Windows.%@NL@%
  4882.  
  4883.  
  4884. Poorly selected screen fonts can both degrade the performance of the system
  4885. and produce highly confusing and ugly screen display.  %@NL@%
  4886.  
  4887. Regardless of the printer font sizes and variations selected, we recommend
  4888. loading a shortened typographic range of screen fonts:  %@NL@%
  4889.  
  4890. 8, 9, 10, 12, 14, 18, 24  %@NL@%
  4891.  
  4892. Load these fonts in normal face only; the screen driver can simulate bold,
  4893. italic, and bold italic. There is no need to double, triple, or quadruple
  4894. the memory used by screen fonts to get these special fonts.  %@NL@%
  4895.  
  4896. Do not load screen fonts for printer fonts that are like %@AI@%Tms Rmn%@AE@%, %@AI@%Helv%@AE@%, or
  4897. %@AI@%Courier%@AE@%. Windows already provides those screen fonts. Additional screen
  4898. fonts would use up memory without additional visual benefits.  %@NL@%
  4899.  
  4900. If you generate one printer font, you should generate the whole recommended
  4901. range. Applications typically offer more than one view of the page, so the
  4902. screen driver will need the different sizes to display the font in each
  4903. view.  %@NL@%
  4904.  
  4905. If you feel you want the typographic quality of pre-built bold and italic
  4906. screen fonts, then you should experiment to see if these fonts look better
  4907. than fonts synthesized by the screen driver. Display a page of text with
  4908. only the normal face loaded, then display it with the normal, bold, and
  4909. italic faces loaded.  %@NL@%
  4910.  
  4911. Never load a bold or italic screen font without a corresponding normal face
  4912. font. Without the normal face, the screen driver will always use the bold or
  4913. italic face, producing an extremely confusing screen display.  %@NL@%
  4914.  
  4915. For example, suppose you decide to create a document that uses a 24-point
  4916. italic font. You then load one printer and one screen font as 24-point
  4917. italic.  %@NL@%
  4918.  
  4919. Thereafter, every time the screen driver determines it needs a 24-point
  4920. screen font that is similar to the font that you installed, it will use the
  4921. 24-point italic face. Regardless of the variation you want (i.e., normal,
  4922. bold, or italic), the font will display in italic.  %@NL@%
  4923.  
  4924. As you add more fonts to your computer, the situation will become more
  4925. confusing. To continue the example, suppose you decide to add the same
  4926. printer and screen font as 48-point normal.  %@NL@%
  4927.  
  4928. When the application displays the 48-point font at 100% view on the screen,
  4929. the font will display as 48-point normal (i.e., the correct behavior). At
  4930. 50% view, the font will display as 24-point italic (because that is the only
  4931. font available). When switching views, therefore, the font changes from
  4932. normal to italic.  %@NL@%
  4933.  
  4934. You can avoid this problem simply by %@AI@%not%@AE@% loading anything other than the
  4935. normal face of the screen font. Normally, the difference between the
  4936. synthesized font and the "true" font is barely noticeable, if noticeable at
  4937. all. If you must load the italic or bold variations, then you must also load
  4938. the normal variation in the same size.  %@NL@%
  4939.  
  4940.  
  4941. %@2@%%@CR:C6A00120004 @%%@AB@%12.3  Recovering Soft Fonts From a WIN.INI Change%@AE@%%@EH@%%@NL@%
  4942.  
  4943. Sometimes you need to remove the contents of your WINDOWS directory and
  4944. reinstall Windows. In the process of doing this, you could lose all the soft
  4945. font information. To prevent losing data:  %@NL@%
  4946.  
  4947.  
  4948.   1.  Build an FINSTALL.DIR file.%@NL@%
  4949.  
  4950. %@STUB@%      From inside Windows, select the Printers icon from Control Panel, and
  4951.       then select the PCL / HP LaserJet printer, Configure, and Setup. %@NL@%
  4952.  
  4953. %@STUB@%      Once inside the driver-specific dialog, click on the "Fonts" button to
  4954.       invoke the Printer Font Installer. The fonts you plan to save should
  4955.       be listed in the left list box. Hold down the CTRL and SHIFT keys
  4956.       while clicking the mouse on the "Exit" button. The installer prompts
  4957.       for a filename and path. Click "OK" to accept the name of the
  4958.       FINSTALL.DIR file. Then, exit Windows.%@NL@%
  4959.  
  4960.   2.  Reinstall Windows.%@NL@%
  4961.  
  4962. %@STUB@%      Perform whatever steps are necessary to reinstall Windows (i.e.,
  4963.       remove everything in the WINDOWS directory and run Windows Setup).%@NL@%
  4964.  
  4965.   3.  Install from the directory to itself to get the soft fonts listed.%@NL@%
  4966.  
  4967. %@STUB@%      Run the Printer Font Installer on the new machine through the Control
  4968.       Panel's Printers icon. Select the PCL/HP LaserJet Printer and, then,
  4969.       Configure and Setup.%@NL@%
  4970.  
  4971. %@STUB@%      From the driver-specific dialog, click on the "Fonts" button to invoke
  4972.       the installer. If the "Fonts" button is not highlighted, then you need
  4973.       to select a printer that supports soft fonts (lower-left list box in
  4974.       the driver-specific dialog). Select "Add fonts..." and specify
  4975.       \PCLFONTS as the source for copying fonts. If your fonts are stored in
  4976.       another directory (such as FONTS or PCLPFM), then specify that
  4977.       directory.%@NL@%
  4978.  
  4979. %@STUB@%      Hold down the CTRL and SHIFT keys while selecting all the fonts in the
  4980.       right list box. Select the "Add..." button between the two list boxes.
  4981.       The installer prompts for a target directory. %@AI@%This must be equivalent
  4982. %@AI@%      to the directory from which you are installing the fonts%@AE@%. If you are
  4983.       installing from \PCLFONTS, then click "OK" to accept \PCLFONTS as the
  4984.       target directory. Otherwise, change the name to that of the directory
  4985.       that contains the soft fonts (such as FONTS or PCLPFM).%@NL@%
  4986.  
  4987. %@STUB@%      The installer then shuffles the fonts %@AI@%very quickly%@AE@% from the right list
  4988.       box to the left list box. It does not copy any fonts; it simply
  4989.       updates the WIN.INI file. If this does not happen quickly, then you
  4990.       probably did not build an FINSTALL.DIR file as described in Step 1 or
  4991.       did not install fonts from and to the same directory.%@NL@%
  4992.  
  4993.  
  4994.  
  4995. %@2@%%@CR:C6A00120005 @%%@AB@%12.4  A Quick Method for Moving Fonts%@AE@%%@EH@%%@NL@%
  4996.  
  4997. The purpose of this section is to describe how to move fonts from one
  4998. machine to another. It is not intended for distributing fonts to several
  4999. users. That procedure is described in Section 12.5, "Building a Floppy Disk
  5000. Set of Fonts." This description is not intended to encourage illegal copying
  5001. of fonts. We assume that you are %@AI@%removing%@AE@% fonts from one machine and adding
  5002. them to another.  %@NL@%
  5003.  
  5004. The steps are as follows:  %@NL@%
  5005.  
  5006.  
  5007.   1.  Build an FINSTALL.DIR file.%@NL@%
  5008.  
  5009. %@STUB@%      From inside Windows, select the Printers icon from Control Panel, and
  5010.       then select the PCL / HP LaserJet printer, Configure, and Setup.%@NL@%
  5011.  
  5012. %@STUB@%      Once inside the driver-specific dialog, click on the "Fonts" button to
  5013.       invoke the Printer Font Installer. The fonts you plan to save should
  5014.       be listed in the left list box. Hold down the CTRL and SHIFT keys
  5015.       while clicking the mouse on the "Exit" button. The installer prompts
  5016.       for a filename and path. Click "OK" to accept the name of the
  5017.       FINSTALL.DIR file. Then, exit Windows.%@NL@%
  5018.  
  5019.   2.  Use the MS-DOS %@AB@%xcopy%@AE@% command to copy files to a floppy disk, by
  5020.       following these instructions:%@NL@%
  5021.  
  5022. %@STUB@%      To change to the directory containing the soft fonts, type:%@NL@%
  5023.  
  5024. %@AS@%      cd \PCLFONTS%@AE@%
  5025.  
  5026. %@STUB@%      To format as many floppy disks as you think are necessary to hold the
  5027.       soft fonts, type:%@NL@%
  5028.  
  5029. %@AS@%      format A:%@AE@%
  5030.  
  5031. %@STUB@%      To make sure that all the files in the directory are %@AI@%not%@AE@% marked for
  5032.       archive, type:%@NL@%
  5033.  
  5034. %@AS@%      attrib -a *.*%@AE@%
  5035.  
  5036. %@STUB@%      To copy files to the first disk, type:%@NL@%
  5037.  
  5038. %@AS@%      xcopy *.* A: /m%@AE@%
  5039.  
  5040. %@STUB@%      If MS-DOS reports an "insufficient disk space" error, format another
  5041.       floppy disk (if necessary) and repeat the %@AB@%xcopy%@AE@% command. The %@AB@%/m%@AE@% option
  5042.       on the %@AB@%xcopy%@AE@% command instructs MS-DOS to mark the files it has copied
  5043.       to disk, so when you repeat the command it does not recopy the files
  5044.       that are already on disk.%@NL@%
  5045.  
  5046. %@STUB@%      Repeat the %@AB@%xcopy%@AE@% command until all the files are on the disk(s).%@NL@%
  5047.  
  5048.   3.  Copy the files from the floppy disk(s) to the new machine, by
  5049.       following these instructions:%@NL@%
  5050.  
  5051. %@STUB@%      On the new machine, to make a directory for the fonts, type:%@NL@%
  5052.  
  5053. %@AS@%      cd \
  5054. %@AS@%      mkdir \PCLFONTS
  5055. %@AS@%      cd \PCLFONTS%@AE@%
  5056.  
  5057. %@STUB@%      To copy the fonts from the floppy disk into the new directory, type:%@NL@%
  5058.  
  5059. %@AS@%      copy A:*.*%@AE@%
  5060.  
  5061. %@STUB@%      Repeat this step for every floppy disk.%@NL@%
  5062.  
  5063.   4.  Install from the directory to itself to get the soft fonts listed.%@NL@%
  5064.  
  5065. %@STUB@%      Run the Printer Font Installer on the new machine through the Control
  5066.       Panel's Printers icon. Select the PCL / HP LaserJet printer and, then,
  5067.       Configure and Setup.%@NL@%
  5068.  
  5069. %@STUB@%      From the driver-specific dialog, click on the "Fonts" button to invoke
  5070.       the installer. Select "Add fonts..." and specify \PCLFONTS as the
  5071.       source for copying fonts. The installer should list all the fonts you
  5072.       just copied into the \PCLFONTS directory.%@NL@%
  5073.  
  5074. %@STUB@%      Hold down the CTRL and SHIFT keys while selecting all the fonts in the
  5075.       right list box. Select the "Add..." button between the two list boxes.
  5076.       The installer will prompt for a target directory. %@AI@%This must be the
  5077. %@AI@%      same directory from which you are installing the fonts%@AE@%. If you are
  5078.       installing from \PCLFONTS, as these instructions indicate, then click
  5079.       "OK" to accept \PCLFONTS as the target directory.%@NL@%
  5080.  
  5081. %@STUB@%      The installer then shuffles the fonts %@AI@%very quickly%@AE@% from the right list
  5082.       box to the left list box. It does not copy any fonts; it simply
  5083.       updates the WIN.INI file. If this does not happen quickly, then you
  5084.       probably did not build an FINSTALL.DIR file as described in Step 1 or
  5085.       did not install fonts from and to the same directory.%@NL@%
  5086.  
  5087.  
  5088. The fonts will be moved to the new machine. Notice that this procedure is
  5089. probably the fastest and simplest way to move fonts from one machine to the
  5090. next. However, we do not recommend it as a general method of distributing
  5091. fonts. The installer has a more elegant and less error-prone way of loading
  5092. fonts from floppy disks as described in the next section.  %@NL@%
  5093.  
  5094.  
  5095. %@2@%%@CR:C6A00120006 @%%@AB@%12.5  Building a Floppy Disk Set of Fonts%@AE@%%@EH@%%@NL@%
  5096.  
  5097. This section describes how to set up a floppy disk set of fonts for
  5098. distribution. This procedure is useful, for example, if a company chooses to
  5099. use a range of fonts available from a font generation utility. One person
  5100. could generate the fonts and create a disk set of fonts for internal
  5101. distribution. Then, all the other users could quickly and easily install the
  5102. pre-generated fonts without having to learn how to use the font generation
  5103. utility.  %@NL@%
  5104.  
  5105. By providing this procedure, we do not encourage illegal copying of fonts.
  5106. We assume that everyone receiving the fonts has either paid some kind of a
  5107. licensing fee or has a copy of the font generation utility that was used to
  5108. build the fonts.  %@NL@%
  5109.  
  5110. To use the following procedure, you must know how to use MS-DOS and a text
  5111. editor. In addition, you should understand the advanced installer features
  5112. described in Chapter 9, "FINSTALL.DIR," and Chapter 10, "Developers' Tools."
  5113. %@NL@%
  5114.  
  5115. The steps are as follows:  %@NL@%
  5116.  
  5117.  
  5118.   1.  Install and/or generate the soft fonts.%@NL@%
  5119.  
  5120. %@STUB@%      Load the fonts onto your machine. If you are generating soft fonts,
  5121.       follow the recommendations outlined in Section 12.1, "Selecting
  5122.       Printer Fonts."%@NL@%
  5123.  
  5124. %@STUB@%      If you have control over the creation of screen fonts, follow the
  5125.       recommendations outlined in Section 12.2, "Selecting Screen Fonts."
  5126.       You should build a set of screen fonts for each type of display that
  5127.       may be used. Generally, this would be an EGA and/or a VGA.%@NL@%
  5128.  
  5129. %@STUB@%      When you make changes to the FINSTALL.DIR file (see Step 4), you can
  5130.       instruct the installer to load different screen fonts depending upon
  5131.       the aspect ratio of the machine receiving the fonts.%@NL@%
  5132.  
  5133.   2.  Build an FINSTALL.DIR file.%@NL@%
  5134.  
  5135. %@STUB@%      From inside Windows, select the Printers icon from Control Panel, and
  5136.       then select the PCL/HP LaserJet printer, Configure, and Setup. %@NL@%
  5137.  
  5138. %@STUB@%      Once inside the driver-specific dialog, click on the "Fonts" button to
  5139.       invoke the Printer Font Installer. The fonts you plan to save should
  5140.       be listed in the left list box. Hold down the CTRL and SHIFT keys
  5141.       while clicking the mouse on the "Exit" button. The installer prompts
  5142.       for a filename and path. Click "OK" to accept the name of the
  5143.       FINSTALL.DIR file. Then, exit Windows.%@NL@%
  5144.  
  5145.   3.  Arrange the font files, .PFM files, .PCM files, screen font files, and
  5146.       FINSTALL.DIR%@AI@% %@AE@%file onto disks.%@NL@%
  5147.  
  5148. %@STUB@%      If all the files fit on one disk, this is an easy task. If they do not
  5149.       and the number of fonts is great, this may be a major task. You will
  5150.       find recommendations for arranging them after this list.%@NL@%
  5151.  
  5152.   4.  Edit the FINSTALL.DIR file to add logical drives.%@NL@%
  5153.  
  5154. %@STUB@%      If the files require more than one disk, edit the FINSTALL.DIR file
  5155.       and add logical drives so the installer will know where all the files
  5156.       are. With logical drives properly set up, the installer will prompt
  5157.       the user to switch disks when necessary.%@NL@%
  5158.  
  5159. %@STUB@%      If you loaded screen fonts, add entries in the FINSTALL.DIR file for
  5160.       screen fonts as well. Place the screen fonts in the appropriate FAMILY
  5161.       block for which the screen fonts were made. The format of the
  5162.       FINSTALL.DIR file is described in Chapter 9, "FINSTALL.DIR."%@NL@%
  5163.  
  5164.   5.  Test the font installation process thoroughly.%@NL@%
  5165.  
  5166. %@STUB@%      Make sure that all the fonts are correctly loaded. If you have screen
  5167.       fonts for different aspect ratios, test loading fonts on machines with
  5168.       different screen displays.%@NL@%
  5169.  
  5170. %@STUB@%      Use the advanced "Add fonts..." button to check the syntax of your
  5171.       FINSTALL.DIR file and verify your screen display type as described in
  5172.       Chapter 10, "Developers' Tools."%@NL@%
  5173.  
  5174.  
  5175. Arranging font files onto disks can be an extremely tedious task, especially
  5176. if you have to set up disks for 360K, 720K (3.5 inch), and 1.2M builds and
  5177. need to conserve disk space.  %@NL@%
  5178.  
  5179. Here are some recommendations:  %@NL@%
  5180.  
  5181.  
  5182.   ■   Keep the screen font files for one FAMILY together on the same disk
  5183.       and make sure the lowest point size font is also on that disk.%@NL@%
  5184.  
  5185.   ■   Keep each .PFM file on the same disk as its corresponding printer font
  5186.       file.%@NL@%
  5187.  
  5188.   ■   Conserve disk space by putting the largest fonts on the disk with the
  5189.       smallest fonts.%@NL@%
  5190.  
  5191.   ■   If you are building the set for different disk densities, build the
  5192.       360K set first, then put the files from two disks onto each 720K disk
  5193.       and the files from three disks onto each 1.2M disk.%@NL@%
  5194.  
  5195.  
  5196. The easiest way to build the disk set is to place files on the disks in the
  5197. exact order in which they appear in the FINSTALL.DIR file. That is, the
  5198. FINSTALL.DIR file goes on first, followed by the screen fonts for the first
  5199. family listed, followed by the .PFM and font files for that family. Make
  5200. sure that all the screen font files for one family go on the same disk, and
  5201. that at least one printer font (the first one listed in the FAMILY block)
  5202. with its .PFM file also goes on that disk.  %@NL@%
  5203.  
  5204. Once the disk set is built and working, reorganize the files to optimize for
  5205. disk space usage. For a sample FINSTALL.DIR file that shows logical drives
  5206. and screen fonts, see Section 9.4, "Sample FINSTALL.DIR File."  %@NL@%
  5207.  
  5208.  
  5209. %@2@%%@CR:C6A00120007 @%%@AB@%12.6  Setting Up Fonts on a Network%@AE@%%@EH@%%@NL@%
  5210.  
  5211. This section describes how a network administrator can set up fonts for use
  5212. on a network. To use this procedure, you must know how to use MS-DOS and a
  5213. text editor. In addition, you must understand the advanced installer
  5214. features described in Chapter 8, "Permanent Soft Fonts," Chapter 9,
  5215. "FINSTALL.DIR," and Chapter 10, "Developers' Tools."  %@NL@%
  5216.  
  5217. To set up fonts for use on a network, follow these steps:  %@NL@%
  5218.  
  5219.  
  5220.   1.  Install and/or generate the soft fonts.%@NL@%
  5221.  
  5222. %@STUB@%      Load the fonts onto your machine. If you are generating soft fonts,
  5223.       follow the recommendations outlined in Section 12.1, "Selecting
  5224.       Printer Fonts."%@NL@%
  5225.  
  5226. %@STUB@%      If you have control over the creation of screen fonts, follow the
  5227.       recommendations outlined in Section 12.2, "Selecting Screen Fonts."
  5228.       You should build a set of screen fonts for each type of display that
  5229.       may be used. Generally, this would be an EGA and/or a VGA. %@NL@%
  5230.  
  5231. %@STUB@%      When you make changes to the FINSTALL.DIR file (see Step 5), you can
  5232.       instruct the installer to load different screen fonts depending upon
  5233.       the aspect ratio of the machine receiving the fonts.%@NL@%
  5234.  
  5235.   2.  Select permanent fonts.%@NL@%
  5236.  
  5237. %@STUB@%      To use permanently downloaded soft fonts, enter the Printer Font
  5238.       Installer (described in the next step) and select the fonts you want
  5239.       permanently downloaded to the printer. When you exit the installer, it
  5240.       will prompt you for the download options. Make sure download "at
  5241.       startup" (i.e., when your machine is turned on) is checked.%@NL@%
  5242.  
  5243.   3.  Build an FINSTALL.DIR file.%@NL@%
  5244.  
  5245. %@STUB@%      From inside Windows, select the Printers icon from Control Panel, and
  5246.       then select the PCL / HP LaserJet printer, Configure, and Setup. %@NL@%
  5247.  
  5248. %@STUB@%      Once inside the driver-specific dialog, click on the "Fonts" button to
  5249.       invoke the Printer Font Installer. The fonts you plan to save should
  5250.       be listed in the left list box. Hold down the CTRL and SHIFT keys
  5251.       while clicking the mouse on the "Exit" button. The installer prompts
  5252.       for a filename and path. Click "OK" to accept the name of the
  5253.       FINSTALL.DIR file. Then, exit Windows.%@NL@%
  5254.  
  5255.   4.  If you are not working from the file server, copy the fonts to the
  5256.       file server.%@NL@%
  5257.  
  5258. %@STUB@%      If you created and installed fonts from the network server, you can
  5259.       skip this step.%@NL@%
  5260.  
  5261. %@STUB@%      Set up a directory on the file server for the fonts and copy all the
  5262.       files to it. Use the MS-DOS commands to do this. If you set up
  5263.       permanent fonts, move the files created by the installer from your
  5264.       machine to the network machine and edit the AUTOEXEC.BAT file on the
  5265.       network to transfer the command line invoking the download batch file.
  5266.       Chapter 8, "Permanent Soft Fonts," describes how permanent soft fonts
  5267.       are set up.%@NL@%
  5268.  
  5269.   5.  Edit FINSTALL.DIR to add screen fonts.%@NL@%
  5270.  
  5271. %@STUB@%      If you generated screen fonts, edit the FINSTALL.DIR file to add
  5272.       references to the fonts. Chapter 9, "FINSTALL.DIR," describes the
  5273.       format of the FINSTALL.DIR file. There is also an example in Section
  5274.       9.4, "Sample FINSTALL.DIR File."%@NL@%
  5275.  
  5276. %@STUB@%      You do not need to add logical drives to the FINSTALL.DIR file if all
  5277.       the font files and .PFM files reside in one directory.%@NL@%
  5278.  
  5279.   6.  Test the font installation process thoroughly.%@NL@%
  5280.  
  5281. %@STUB@%      Make sure that all the fonts are correctly loaded. If you have screen
  5282.       fonts for different aspect ratios, test loading fonts on machines with
  5283.       different screen displays.%@NL@%
  5284.  
  5285. %@STUB@%      Use the advanced "Add fonts..." button to check the syntax of your
  5286.       FINSTALL.DIR file and verify your screen display type as described in
  5287.       Chapter 10, "Developers' Tools."%@NL@%
  5288.  
  5289.   7.  Announce the availabilty of soft fonts to network users.%@NL@%
  5290.  
  5291. %@STUB@%      Instruct your users that the fonts are available. They can load the
  5292.       fonts by running the Printer Font Installer and selecting "Add
  5293.       fonts..." They should indicate the network drive and path to the
  5294.       directory containing the soft fonts (in response to the "Add fonts..."
  5295.       request for a directory). Installation of the fonts this way will be
  5296.       much faster than loading from floppy disks.%@NL@%
  5297.  
  5298. %@STUB@%      If you set up permanent soft fonts, then your instructions must list
  5299.       those fonts and their ID numbers for the users. Instruct the users to
  5300.       enable the "Edit" button and edit each of the permanent fonts,
  5301.       verifying the ID numbers. They must change the ID numbers on any fonts
  5302.       that do not match your list. See Help under the "Printer Font
  5303.       Installer" dialog for a description of the user  interface.%@NL@%
  5304.  
  5305.  
  5306. The only "tricky" part to setting up fonts on a network is making sure that
  5307. all the users have assigned the correct IDs to their permanent fonts. This
  5308. is not as difficult as it seems. There usually are only a few permanent
  5309. fonts, and the installer resolves ID conflicts. If the user attempts to
  5310. assign an ID to a font that is used by another font, the installer will ask
  5311. the user if the other font should be assigned a new ID. The installer will
  5312. select the first available ID number when assigning a new ID.  %@NL@%
  5313.  
  5314.  
  5315. %@2@%%@CR:C6A00120008 @%%@AB@%12.7  Setting Up .PFM Files for Resident and Cartridge Fonts%@AE@%%@EH@%%@NL@%
  5316.  
  5317. It is possible to build special .PFM files for printer-resident and
  5318. cartridge fonts. These fonts should be set up as permanently downloaded
  5319. fonts in the WIN.INI file or collected into a cartridge .PCM file. The
  5320. special .PFM files contain the escape sequences that the driver will send to
  5321. the printer to use the fonts.  %@NL@%
  5322.  
  5323. Font or printer vendors will most likely build the .PFM and .PCM files.
  5324. Chapter 2, "Printer Font Metrics (PFM) Files," in Part 1, "Fonts," describes
  5325. the format of .PFM and .PCM files.  %@NL@%
  5326.  
  5327. In short, to set up cartridge and printer-resident fonts, the developer
  5328. should do the following:  %@NL@%
  5329.  
  5330.  
  5331.   1.  Build special .PFM files.%@NL@%
  5332.  
  5333.   2.  If appropriate, combine PFMs into a .PCM using the PFM Editor.%@NL@%
  5334.  
  5335.   3.  Make a special FINSTALL.DIR file for loading .PFM-only fonts or .PCM
  5336.       files.%@NL@%
  5337.  
  5338.  
  5339. In addition to the structures described for the .PFM files, the driver has a
  5340. driver-specific data structure that must be added to the file. The
  5341. PFMEXTENSION structure contains a %@AB@%dfDriverInfo%@AE@% variable. This variable is a
  5342. file offset to the driver-specific structure. (See Part 1, "Fonts," for more
  5343. information on .PFM and .PCM file formats and the new PFM Editor.) For the
  5344. PCL driver, the driver-specific structure looks like this:  %@NL@%
  5345.  
  5346. %@AS@%  typedef enum
  5347. %@AS@%     {
  5348. %@AS@%     epsymUserDefined,
  5349. %@AS@%     epsymRoman8,
  5350. %@AS@%     epsymKana8,
  5351. %@AS@%     epsymMath8,
  5352. %@AS@%     epsymUSASCII,
  5353. %@AS@%     epsymLineDraw,
  5354. %@AS@%     epsymMathSymbols,
  5355. %@AS@%     epsymUSLegal,
  5356. %@AS@%     epsymRomanExt,
  5357. %@AS@%     epsymISO_DenNor,
  5358. %@AS@%     epsymISO_UK,
  5359. %@AS@%     epsymISO_France,
  5360. %@AS@%     epsymISO_German,
  5361. %@AS@%     epsymISO_Italy,
  5362. %@AS@%     epsymISO_SwedFin,
  5363. %@AS@%     epsymISO_Spain,
  5364. %@AS@%     epsymGENERIC7,
  5365. %@AS@%     epsymGENERIC8,
  5366. %@AS@%     epsymECMA94
  5367. %@AS@%     } SYMBOLSET;%@AE@%
  5368.  
  5369. %@AS@%  typedef struct
  5370. %@AS@%     {
  5371. %@AS@%     SYMBOLSET symbolSet;         /* kind of translation table */
  5372. %@AS@%     DWORD offset;                /* location of user-defined table */
  5373. %@AS@%     WORD len;                    /* length (in bytes) of table */
  5374. %@AS@%     BYTE firstchar, lastchar;    /* table ranges from firstchar to 
  5375. %@AS@%             /*   lastchar */
  5376. %@AS@%     } TRANSTABLE;%@AE@%
  5377.  
  5378. %@AS@%  typedef struct
  5379. %@AS@%     {
  5380. %@AS@%     WORD epSize;                 /* size of this data structure */
  5381. %@AS@%     WORD epVersion;              /* number indicates ver of struct */
  5382. %@AS@%     DWORD epMemUsage;            /* amt of memory font takes up in 
  5383. %@AS@%                                  /*   printer */
  5384. %@AS@%     DWORD epEscape;              /* pointer to the escape that 
  5385. %@AS@%                                  /*   selects the font */
  5386. %@AS@%     TRANSTABLE xtbl;             /* character set translation info */
  5387. %@AS@%     } DRIVERINFO;%@AE@%
  5388.  
  5389. The values of the fields in the DRIVERINFO structure should be filled in as
  5390. follows:  %@NL@%
  5391.  
  5392. %@TH:  24  1049 02 34 44 @%
  5393. Field                             Value
  5394. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  5395. %@AB@%epSize%@AE@%                            size of (DRIVERINFO)
  5396.  
  5397. %@AB@%epVersion%@AE@%                         1
  5398.  
  5399. %@AB@%epMemUsage%@AE@%                        An approximation of the printer memory 
  5400.                                   used by the font
  5401.  
  5402. %@AB@%epEscape%@AE@%                          An offset from the top of the file to the 
  5403.                                   escape string that the driver should send 
  5404.                                   to the printer to invoke the font
  5405.  
  5406. %@AB@%xtbl.xtSymbolSet%@AE@%                  %@AB@%epsymGENERIC7%@AE@% for 7-bit fonts and %@AB@%%@AE@%
  5407.                                   %@AB@%epsymGENERIC8%@AE@% for 8-bit fonts
  5408.  
  5409. %@AB@%xtbl.xtOffset%@AE@%                     (long)0
  5410.  
  5411. %@AB@%xtbl.xtLen%@AE@%                        0
  5412.  
  5413. %@AB@%xtbl.xtFirstChar%@AE@%                  (BYTE)0
  5414.  
  5415. %@AB@%xtbl.xtLastChar%@AE@%                   (BYTE)0
  5416.  
  5417. %@TE:  24  1049 02 34 44 @%
  5418.  
  5419. In addition, the escape string for invoking the fonts must be written to the
  5420. .PFM file. The driver will use the escape string pointed to by %@AB@%epEscape%@AE@% to
  5421. select the font. Once the .PFM and .PCM files are built, you must make an
  5422. FINSTALL.DIR file. See Section 9.4, "Sample FINSTALL.DIR File," for an
  5423. example.  %@NL@%
  5424.  
  5425. Sometimes, a user might need to install .PFM files for fonts that do not
  5426. exist. Take, for example, the case in which a user needs to compose a file
  5427. for a typesetting service and does not have the necessary fonts. If the
  5428. typesetter could set up a special FINSTALL.DIR and the necessary .PFM files,
  5429. they could give just this information to their customers and not force them
  5430. to purchase the fonts.  %@NL@%
  5431.  
  5432. In .PFM files, the absence of the downloadable font file is indicated by two
  5433. commas in the font string, as in the following example:  %@NL@%
  5434.  
  5435. %@AS@%  "Tms Rmn 12pt"=PL,  ,  CPY_TMS.PFM%@AE@%
  5436.  
  5437. The installer loads these fonts as permanently downloadable soft fonts. This
  5438. has one side effect. When the user exits the installer, it will prompt for
  5439. download options. Because the installer thinks the fonts are permanent soft
  5440. fonts, it will try to download them to the printer. However, it will not
  5441. find the permanent font files because they do not exist. Therefore, the
  5442. installer will simply ignore the files and not make a download batch file or
  5443. open a print job. However, if these fonts are mixed in with other "real"
  5444. permanent soft fonts, then the installer will correctly download those
  5445. fonts.  %@NL@%
  5446.  
  5447. If the target printer is a standard LaserJet, the driver will not load soft
  5448. font .PFM files. The driver will not load the .PFM files when the target
  5449. printer cannot handle soft fonts. However, the user may instruct the driver
  5450. to load cartridge font (PCM) information to gain access to the cartridge
  5451. font information. To override the soft font restrictions, you can place the
  5452. following flag in the driver-specific section of the WIN.INI file:  %@NL@%
  5453.  
  5454. %@AB@%options%@AE@%=7  %@NL@%
  5455.  
  5456. This flag, described in Chapter 7, "WIN.INI Flags," instructs the driver to
  5457. load soft font information regardless of the printer's abilities. However,
  5458. this is not recommended.  %@NL@%
  5459.  
  5460.  
  5461.  
  5462.  
  5463.  
  5464.  
  5465. %@CR:C6A-Part 03 @%%@1@%%@AB@%PART III  The PostScript Driver%@AE@%%@EH@%%@NL@%
  5466. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  5467.  
  5468. This part presents technical aspects of the version 3.3 Microsoft Windows
  5469. PostScript printer driver. It should be read by technical support
  5470. specialists, Windows application developers, and advanced users.  %@NL@%
  5471.  
  5472. We assume that the audience for this document has knowledge of how to build
  5473. a Windows .PFM (Printer Font Metrics) file, which is documented in Part 1,
  5474. "Fonts," and how to use MS-DOS and a text editor.  %@NL@%
  5475.  
  5476. These chapters outline the new features and their impact on applications.
  5477. Some of the topics discussed are new escapes that are important for
  5478. performance and new features support, the WIN.INI settings, the use of soft
  5479. fonts, and external printer and header support. (See the %@AI@%Microsoft Windows
  5480. %@AI@%Software Development Kit%@AE@% and the %@AI@%Microsoft Windows Device Development Kit%@AE@%
  5481. documentation for a complete list of escapes.)  %@NL@%
  5482.  
  5483.  
  5484.  
  5485.  
  5486.  
  5487.  
  5488. %@CR:C6A00130001 @%%@1@%%@AB@%Chapter 13  Overview of the PostScript Driver%@AE@%%@EH@%%@NL@%
  5489. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  5490.  
  5491. The Microsoft Windows PostScript driver version 3.3 uses many of the new
  5492. Windows 3.0 features and improves on past versions of the driver in the
  5493. following areas:  %@NL@%
  5494.  
  5495.  
  5496.   ■   Speed%@NL@%
  5497.  
  5498.   ■   Memory utilization%@NL@%
  5499.  
  5500.   ■   Functionality%@NL@%
  5501.  
  5502.  
  5503. Versions 3.3 and higher produce output faster with optimized output
  5504. functions. Printing speeds are increased by producing tighter, more
  5505. efficient PostScript code. This is necessary because the size of the output
  5506. produced is critical when output must travel over serial communication
  5507. lines.  %@NL@%
  5508.  
  5509. The driver has been segment optimized to enable printing in very low memory
  5510. situations.  %@NL@%
  5511.  
  5512. Full RGB color is supported in output primitives, including text and
  5513. bitmaps. On black and white printers, the PostScript color machinery
  5514. converts RGB colors to gray levels.  %@NL@%
  5515.  
  5516. Windows 3.0 device-independent bitmaps (DIBs) are supported allowing
  5517. multiple bit-per-pixel images to be rendered on both black and white and
  5518. color devices. Bitmap output has been vastly improved by the inclusion of
  5519. the %@AB@%StretchBlt()%@AE@% function in the GDI/Driver interface. PostScript's ability
  5520. to scale bitmaps is now used along with some compression techniques to
  5521. reduce the size and increase the speed of bitmap output.  %@NL@%
  5522.  
  5523. The following are limitations placed on the driver by PostScript:  %@NL@%
  5524.  
  5525.  
  5526.   ■   PostScript does not support most raster operations (Rops). However, it
  5527.       does support BLACKNESS, WHITENESS, and SRCCOPY.%@NL@%
  5528.  
  5529.   ■   PostScript has a 750-point polygon limit. This number is reduced by
  5530.       two when filling with a hatch or pattern. This is because a clipping
  5531.       path must be built as well as the path to fill and stroke. In cases
  5532.       where this limit is reached, the driver will request that GDI simulate
  5533.       the polygon. This is very slow. Applications should, therefore, avoid
  5534.       generating large polygons.%@NL@%
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540.  
  5541.  
  5542. %@CR:C6A00140001 @%%@1@%%@AB@%Chapter 14  New Features%@AE@%%@EH@%%@NL@%
  5543. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  5544.  
  5545. The following sections in this chapter include brief descriptions of the
  5546. major new features incorporated into the version 3.3 Microsoft Windows
  5547. PostScript driver. References are also made to other documents and chapters
  5548. for further detailed information.  %@NL@%
  5549.  
  5550.  
  5551. %@2@%%@CR:C6A00140002 @%%@AB@%14.1  Color%@AE@%%@EH@%%@NL@%
  5552.  
  5553. The PostScript driver is a one bit-per-pixel device. However, this does not
  5554. mean it can represent only black and white. Bitmaps in a one bit-per-pixel
  5555. format can use any color for the foreground and background.  %@NL@%
  5556.  
  5557. On black and white devices, colors are converted to gray levels by the
  5558. PostScript color machinery. For example, when a bitmap is transferred to the
  5559. printer, the foreground and background colors are examined to determine the
  5560. two colors to use for the transfer.  %@NL@%
  5561.  
  5562. Windows uses %@AI@%brushes%@AE@% to fill objects. %@AI@%Patterned brushes%@AE@% are defined by an
  5563. 8x8 bitmap that is used to tile a region that is to be filled. However,
  5564. since the PostScript driver is a one bit-per-pixel device, there is no color
  5565. information stored in its brushes. When a brush is used to fill an object,
  5566. the current text and background colors are used.  %@NL@%
  5567.  
  5568.  
  5569. %@2@%%@CR:C6A00140003 @%%@AB@%14.2  Device-Independent Bitmaps%@AE@%%@EH@%%@NL@%
  5570.  
  5571. Device-independent bitmaps (DIBs) are used to deal with more than one
  5572. bit-per-pixel bitmaps. The implementation in the PostScript driver uses the
  5573. PostScript %@AI@%image%@AE@% operator on black and white devices and the %@AI@%colorimage%@AE@%
  5574. operator on color devices to render multiple bit-per-pixel images. (Notice,
  5575. however, that this makes the output printer-dependent.)  %@NL@%
  5576.  
  5577. Applications that want to print multiple bit-per-pixel images should use the
  5578. %@AB@%SetDIBitsToDevice()%@AE@% or %@AB@%StretchDIBitsToDevice()%@AE@% function to render these
  5579. images. GDI will simulate these if the driver does not support them.  %@NL@%
  5580.  
  5581. For an example of how this is used, examine the source of the sample
  5582. application SHOWDIB, provided on the SDK disks.  %@NL@%
  5583.  
  5584.  
  5585. %@2@%%@CR:C6A00140004 @%%@AB@%14.3  External Printer and Printer Font Metrics Support%@AE@%%@EH@%%@NL@%
  5586.  
  5587. External printer descriptions are supported by the PostScript driver. When
  5588. supplied with the proper files, the PostScript driver can support printers
  5589. that are not listed in the default printer list of the printer Setup dialog.
  5590. These are discussed in detail in Chapter 16, "WIN.INI Settings." For more
  5591. information on how Microsoft supports external printer descriptions, see
  5592. Chapter 17, "External Printer Descriptions Support."%@AB@%  %@AE@%%@NL@%
  5593.  
  5594. For printers that have hard disks or resident fonts from some other source,
  5595. external .PFM files can be added to WIN.INI to make the driver aware of
  5596. these fonts. This is similar to the way softfonts are installed and is
  5597. discussed in detail in Chapter 16, "WIN.INI Settings."  %@NL@%
  5598.  
  5599.  
  5600. %@2@%%@CR:C6A00140005 @%%@AB@%14.4  PostScript Header Support%@AE@%%@EH@%%@NL@%
  5601.  
  5602. The size of the PostScript header has been reduced to less than 8K. Most
  5603. header functions have been rewritten with efficiency and compactness in mind
  5604. and all the unnecessary white space removed. This reduces the overhead of
  5605. print jobs that include the header to only a few seconds.  %@NL@%
  5606.  
  5607. Problems with the header downloading mechanism have been fixed. For users
  5608. that want to reduce printing times as much as possible, they should download
  5609. the header to their printer using the Print Options dialog to make all the
  5610. functions used be resident in the printer. With the header in place,
  5611. printing times are reduced by about 10 seconds. However, for sending files
  5612. to service bureaus, the header must be included in the print job and not
  5613. downloaded previously.  %@NL@%
  5614.  
  5615.  
  5616. %@2@%%@CR:C6A00140006 @%%@AB@%14.5  The Error Handler%@AE@%%@EH@%%@NL@%
  5617.  
  5618. There is an error handler built into the driver that may be downloaded to
  5619. the printer. With the error handler resident in the printer, any time an
  5620. error occurs it will print the contents of the page and, then, print a sheet
  5621. that indicates what error occurred and what was on the PostScript stack.  %@NL@%
  5622.  
  5623. This can be useful for diagnosing printing problems. Sophisticated
  5624. PostScript users may want to send their own PostScript to the printer (as
  5625. done by some applications such as Corel Draw and Adobe Illustrator(tm)). For
  5626. them, this is a good debugging tool.  %@NL@%
  5627.  
  5628. To access the error handler, press ALT+E in the Print Options dialog (notice
  5629. that there is no button, since this is an invisible control). From there,
  5630. the error handler can be sent to a file or to the printer.  %@NL@%
  5631.  
  5632.  
  5633. %@2@%%@CR:C6A00140007 @%%@AB@%14.6  GDI StretchBlt() Support%@AE@%%@EH@%%@NL@%
  5634.  
  5635. In Windows 3.0, GDI enables drivers to support the %@AB@%StretchBlt()%@AE@% function
  5636. directly. In the past, GDI would do the stretching itself and build a
  5637. temporary bitmap at the device resolution. This was very slow and consumed a
  5638. lot of memory. PostScript, though, supports arbitrary scaling of bitmap
  5639. images so this was also unnecessary.  %@NL@%
  5640.  
  5641. With %@AB@%StretchBlt()%@AE@% implemented at the device-driver level in the PostScript
  5642. driver, the source bitmap is transferred directly to the printer and
  5643. stretched using the PostScript %@AI@%imagemask%@AE@% operator. An RLE compression scheme
  5644. has also been implemented to reduce the amount of data that needs to be
  5645. transferred to the printer. For most images, this means much less data is
  5646. produced and rendering is much faster.%@AB@%  %@AE@%%@NL@%
  5647.  
  5648.  
  5649. %@2@%%@CR:C6A00140008 @%%@AB@%14.7  Device Initialization%@AE@%%@EH@%%@NL@%
  5650.  
  5651. The PostScript driver supports the Windows 3.0 device initialization
  5652. functions. This means that applications can maintain private,
  5653. device-independent initialization data that is separate from the default
  5654. configurations set using Control Panel.  %@NL@%
  5655.  
  5656. For more information, see the documentation on the %@AB@%ExtDeviceMode()%@AE@% and
  5657. %@AB@%DeviceCapabilities()%@AE@% functions in the %@AI@%Microsoft Windows Software Development
  5658. %@AI@%Kit%@AE@%.  %@NL@%
  5659.  
  5660.  
  5661. %@2@%%@CR:C6A00140009 @%%@AB@%14.8  Rotated Text%@AE@%%@EH@%%@NL@%
  5662.  
  5663. The version 3.3 Windows PostScript driver can support printing text at any
  5664. angle. Applications may create fonts using any Escapement value (i.e., by
  5665. specifying the angle of the baseline). The only limitation is that the
  5666. Orientation (i.e., the angle of individual characters) is ignored.  %@NL@%
  5667.  
  5668.  
  5669. %@2@%%@CR:C6A00140010 @%%@AB@%14.9  EPS Printing%@AE@%%@EH@%%@NL@%
  5670.  
  5671. Users can produce an Encapsulated PostScript (EPS) file that can be imported
  5672. into applications such as Aldus PageMaker with any Windows application that
  5673. prints using the PostScript driver. This is done by selecting "Print to EPS
  5674. file" on the PostScript Options dialog box and, then, printing. The output
  5675. of the print job is redirected into the PostScript-only EPS file specified
  5676. in the Options dialog box. No alternate representation of the image (e.g.,
  5677. metafile or TIFF image) is produced by the driver.  %@NL@%
  5678.  
  5679. By default, the bounding rectangle is the whole page (i.e., the imageable
  5680. area of the page). If the printing application issues a SETBOUNDS escape,
  5681. that rectangle will be used instead of the whole page. Therefore, before
  5682. printing a page, every application that might possibly have its output sent
  5683. to an EPS file should issue a SETBOUNDS escape with the bounding rectangle
  5684. of all the output.  %@NL@%
  5685.  
  5686.  
  5687.  
  5688.  
  5689.  
  5690.  
  5691. %@CR:C6A00150001 @%%@1@%%@AB@%Chapter 15  Escapes%@AE@%%@EH@%%@NL@%
  5692. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  5693.  
  5694. This chapter discusses briefly only three of the main PostScript-related
  5695. printer escapes. Detailed descriptions of most of them are available in the
  5696. M%@AI@%icrosoft Windows Device Driver Adaptation Guide%@AE@% (which has driver-oriented
  5697. descriptions) and/or in the %@AI@%Microsoft Windows Software Development Kit%@AE@%
  5698. (which has application-oriented descriptions).  %@NL@%
  5699.  
  5700. The EPSPRINTING escape is intended for applications that produce their own
  5701. PostScript. It suppresses the Windows PostScript header. With this option
  5702. on, no GDI output functions will work.  %@NL@%
  5703.  
  5704. The POSTSCRIPT_DATA escape is just like the PASSTHROUGH (also known as
  5705. DEVICE_DATA) escape except that it is recognized only by PostScript devices.
  5706. This escape is intended for applications that produce two representations of
  5707. the output: one intended for PostScript devices and the other for
  5708. non-PostScript devices. It should be used in conjunction with
  5709. POSTSCRIPT_IGNORE to make the PostScript driver ignore the GDI
  5710. representation.  %@NL@%
  5711.  
  5712. The POSTSCRIPT_IGNORE escape is used to make the PostScript driver ignore or
  5713. accept all the output. %@AI@%lpInData%@AE@% points to a BOOL that indicates whether the
  5714. GDI functions should be ignored (TRUE) or not (FALSE, the default).  %@NL@%
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720.  
  5721. %@CR:C6A00160001 @%%@1@%%@AB@%Chapter 16  WIN.INI Settings%@AE@%%@EH@%%@NL@%
  5722. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  5723.  
  5724. This chapter discusses several PostScript-related WIN.INI settings and how
  5725. to enter soft fonts in the Microsoft Windows WIN.INI file.  %@NL@%
  5726.  
  5727.  
  5728. %@2@%%@CR:C6A00160002 @%%@AB@%16.1  Global Initialization Section%@AE@%%@EH@%%@NL@%
  5729.  
  5730. The following is an example of the global initialization section, which
  5731. contains data that is not associated with a particular port. As of now, this
  5732. includes the presence of external printers (i.e., printers added through the
  5733. "Add Printer..." button on the Setup dialog) that are defined in .WPD files.
  5734. %@NL@%
  5735.  
  5736. %@AS@%  [PSCRIPT]
  5737. %@AS@%  External Printers=2
  5738. %@AS@%  printer1=abc_ps
  5739. %@AS@%  printer2=xyz_ps%@AE@%
  5740.  
  5741. Where:  %@NL@%
  5742.  
  5743. "External Printers" indicates how many external printers there are.
  5744. "printer%@AI@%n%@AE@%" indicates the base filename of a given external printer.  %@NL@%
  5745.  
  5746.  
  5747. %@2@%%@CR:C6A00160003 @%%@AB@%16.2  Per-Port Initialization Section%@AE@%%@EH@%%@NL@%
  5748.  
  5749. The following is an example of the per-port initialization section, which
  5750. contains data that is specific to each port connection. Notice that Windows
  5751. saves the state of printer connections on a per-port basis.  %@NL@%
  5752.  
  5753. %@AS@%  [PostScript,COM1]
  5754. %@AS@%  device=4
  5755. %@AS@%  feed2=1
  5756. %@AS@%  feed15=5
  5757. %@AS@%  softfonts=4
  5758. %@AS@%  softfont1=filea.pfm, c:\fonts\filea.agb
  5759. %@AS@%  softfont2=fontb.pfm, c:\fonts\fontb.agb
  5760. %@AS@%  softfont3=fontc.pfm
  5761. %@AS@%  softfont4=fontd.pfm%@AE@%
  5762.  
  5763. Soft fonts may also reference the internal font metrics built into the
  5764. driver. To do this, add a %@AB@%softfont%@AE@%%@AI@%n%@AE@% entry that references the base name of
  5765. the built-in .PFM file, as in the example "%@AB@%softfont5=%@AE@%CB" for "Courier-Bold."
  5766. For a complete list of the available .AFM filenames, see the README.TXT file
  5767. on the last disk of the DDK set of disks.  %@NL@%
  5768.  
  5769.  
  5770. %@2@%%@CR:C6A00160004 @%%@AB@%16.3  Use of Soft Fonts%@AE@%%@EH@%%@NL@%
  5771.  
  5772. The %@AB@%softfont%@AE@%%@AI@%n%@AE@% entries in WIN.INI can be used for several different purposes.
  5773. Basically, they inform the driver that a given printer has extra fonts
  5774. available and, if necessary, indicate a file that needs to be downloaded to
  5775. make that font available. If there is a second file listed in a %@AB@%softfont%@AE@%%@AI@%n%@AE@%
  5776. entry, it is assumed that it needs to be downloaded to activate the given
  5777. font. Thus, soft fonts can be used to support resident printer fonts that
  5778. have been downloaded previously, that reside on a printer's hard disk, or
  5779. that are available in some other form.  %@NL@%
  5780.  
  5781. The %@AB@%softfonts%@AE@% entry indicates how many soft fonts are installed and listed.
  5782. The maximum number of soft fonts allowed now is 255. The limit was 99 in
  5783. version 3.2 and earlier ones.  %@NL@%
  5784.  
  5785. Each %@AB@%softfont%@AE@%%@AI@%n%@AE@% entry references the .PFM file associated with a soft font
  5786. and, optionally, the soft font that will be downloaded to the printer at
  5787. print time. Each filename may be a complete pathname. The two forms of soft
  5788. fonts supported are described in the following subsections.  %@NL@%
  5789.  
  5790.  
  5791. %@3@%%@CR:C6A00160005 @%%@AB@%16.3.1  Adobe Soft Font Format (.AGB)%@AE@%%@EH@%%@NL@%
  5792.  
  5793. Adobe soft fonts are recognized by the string "%!PS-AdobeFont" being found
  5794. at offset 6 in the file. The first 6 bytes are defined by the following data
  5795. structure:  %@NL@%
  5796.  
  5797. %@AS@%  typedef struct{
  5798. %@AS@%   unsigned char flag;
  5799. %@AS@%   char type; /* 1 means data is ASCII, 2 means binary */
  5800. %@AS@%     /*    (convert to ascii) */
  5801. %@AS@%   long length; /* length of the data that follows */
  5802. %@AS@%   } HDR;%@AE@%
  5803.  
  5804. The fields indicate the length of the soft font as well as the type (ASCII
  5805. or binary). Binary forms are converted to hex ASCII by the driver; ASCII
  5806. fonts are copied directly.  %@NL@%
  5807.  
  5808.  
  5809. %@3@%%@CR:C6A00160006 @%%@AB@%16.3.2  Non-Adobe Soft Font Format%@AE@%%@EH@%%@NL@%
  5810.  
  5811. Fonts that do not have the above-mentioned signature are copied to the
  5812. output stream. Therefore, the whole file must be in PostScript code that
  5813. describes the font.  %@NL@%
  5814.  
  5815.  
  5816.  
  5817.  
  5818.  
  5819.  
  5820. %@CR:C6A00170001 @%%@1@%%@AB@%Chapter 17  External Printer Descriptions Support%@AE@%%@EH@%%@NL@%
  5821. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  5822.  
  5823. Version 3.3 of the Microsoft Windows PostScript printer driver supports the
  5824. ability to add external printer descriptions. Users can install a new
  5825. printer definition by simply choosing the "Add Printer..." button on the
  5826. printer Setup dialog box.  %@NL@%
  5827.  
  5828. For the user to be able to do this, the printer manufacturer must supply a
  5829. disk with information about the device. Printer manufacturers need to
  5830. produce Windows Printer Description (.WPD) files by compiling Adobe standard
  5831. .PPD files with the MKPRN.EXE utility. This chapter describes how printer
  5832. manufacturers can build a distribution disk and a .WPD file that will enable
  5833. users to add a printer to the Microsoft Windows PostScript printer driver.  %@NL@%
  5834.  
  5835. The PostScript Printer Description (.PPD) file format was defined by Adobe
  5836. and extended by the Microsoft Windows PostScript printer driver to provide a
  5837. basis for external printer descriptions. This file is then compiled into a
  5838. Windows Printer Description (.WPD) file with a tool provided in this kit.
  5839. For a particular PostScript printer to be supported in the Windows
  5840. PostScript printer driver, it must have a .WPD file describing the following
  5841. attributes:  %@NL@%
  5842.  
  5843.  
  5844.   ■   What fonts are resident %@NL@%
  5845.  
  5846.   ■   How many paper sizes and input trays are supported %@NL@%
  5847.  
  5848.   ■   How sizes and trays are activated %@NL@%
  5849.  
  5850.   ■   What is the imageable area of each of the supported page sizes (i.e.,
  5851.       the area on which the printer can actually mark)%@NL@%
  5852.  
  5853.  
  5854. A few extensions have also been made to the WPD definition to enable Windows
  5855. to take advantage of paper-handling capabilities.  %@NL@%
  5856.  
  5857. For further information on PostScript Printer Description files, you need to
  5858. obtain from Adobe their document %@AI@%PostScript PRINTER DESCRIPTION FILES
  5859. %@AI@%Specification Version 3.0.%@AE@%  %@NL@%
  5860.  
  5861.  
  5862. %@2@%%@CR:C6A00170002 @%%@AB@%17.1  Tools Provided%@AE@%%@EH@%%@NL@%
  5863.  
  5864. The following files are provided with the DDK to support adding external
  5865. printer descriptions:  %@NL@%
  5866.  
  5867. %@AB@%File%@AE@%                              %@AB@%Description%@AE@%
  5868. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  5869. MKPRN.EXE                         The MKPRN compiler. An MS-DOS 
  5870.                                   application that reads .PPD and .PFM 
  5871.                                   files to produce the Windows Printer 
  5872.                                   Description (.WPD) file.
  5873.  
  5874. *.PFM                             The 63 .AFM files (Font Metric files) 
  5875.                                   that are needed to build the font 
  5876.                                   directories for each printer. (See the 
  5877.                                   README.TXT file on the last DDK disk for
  5878.                                   a complete list of the files.) These 
  5879.                                   files correspond to the font metrics 
  5880.                                   built into the driver. Printers with 
  5881.                                   fonts that are not found here need to be
  5882.                                   installed as "soft fonts" as described 
  5883.                                   in Chapter 16, "WIN.INI Settings."
  5884.  
  5885. *.PPD                             The .PPD sample files.
  5886.  
  5887. If you need to define a font that is not available currently in the
  5888. PostScript printer driver, you will need to modify the driver sources to add
  5889. additional .AFM files. Please refer to the PostScript driver's MAKE file
  5890. that is included on the DDK disks for more information on how the driver
  5891. builds .AFM and .PFM files.  %@NL@%
  5892.  
  5893.  
  5894. %@2@%%@CR:C6A00170003 @%%@AB@%17.2  Building an External Printer Distribution Disk%@AE@%%@EH@%%@NL@%
  5895.  
  5896. This section includes step-by-step procedures for building an external
  5897. printer distribution disk.  %@NL@%
  5898.  
  5899. First, to generate the required files, do the following:  %@NL@%
  5900.  
  5901.  
  5902.   1.  Build a .PPD file that fully describes your printer.%@NL@%
  5903.  
  5904.   2.  Use MKPRN.EXE to build the .WPD file.%@NL@%
  5905.  
  5906.   3.  Make a PRINTERS.INI file that lists the printers available for
  5907.       installation.%@NL@%
  5908.  
  5909.  
  5910. Second, to build a distribution disk, do the following:  %@NL@%
  5911.  
  5912.  
  5913.   1.  Copy the .WPD file to the distribution disk.%@NL@%
  5914.  
  5915.   2.  Copy the PRINTERS.INI file to the distribution disk.%@NL@%
  5916.  
  5917.  
  5918. Finally, to test your printer, do the following:  %@NL@%
  5919.  
  5920.  
  5921.   1.  Use the distribution disk you just built to install your printer.
  5922.       Choose the "Add Printer..." button on the PostScript printer Setup
  5923.       dialog and add the appropriate printer.%@NL@%
  5924.  
  5925.   2.  Select the newly installed printer from the "Printers list" in the
  5926.       main dialog box.%@NL@%
  5927.  
  5928.   3.  Test the features of your printer. You will probably want to have the
  5929.       error handler downloaded to the printer. You can download the error
  5930.       handler by pressing ALT+E in the printer Options dialog. Be sure to
  5931.       test the following features:
  5932.  
  5933.       ■   Paper sizes. Make sure that all the paper sizes are available and
  5934.           that the imageable areas are correct.%@NL@%
  5935.  
  5936.       ■   Paper sources. Test that all the paper sources can be selected
  5937.           properly.%@NL@%
  5938.  
  5939.       ■   Normalized transfer function. Use an application (e.g.,
  5940.           Micrografx(tm) Designer 2.0) that can generate gradiated fills to
  5941.           make sure that gray levels are represented in a linear fashion.%@NL@%
  5942. %@NL@%
  5943.  
  5944.  
  5945. If you find any problems, make the appropriate changes to the .PPD file,
  5946. rebuild the .WPD file, and install the new WPD over the existing one.  %@NL@%
  5947.  
  5948. ────────────────────────────────────────────────────────────────────────────%@NL@%
  5949. NOTE
  5950.  
  5951. %@AI@%The description string in PRINTERS.INI needs to match the "*NIckName"
  5952. %@AI@%keyword from the .PPD file.%@AE@%
  5953. ────────────────────────────────────────────────────────────────────────────%@NL@%
  5954.  
  5955.  
  5956. %@2@%%@CR:C6A00170004 @%%@AB@%17.3  The MKPRN Compiler%@AE@%%@EH@%%@NL@%
  5957.  
  5958. Adobe standard PostScript Printer Description (PPD) files contain the
  5959. information needed for the Microsoft Windows PostScript printer driver to
  5960. support a particular printer. The PPD keywords and extensions are described
  5961. in Section 17.5, "Keywords and Extensions."  %@NL@%
  5962.  
  5963. The MKPRN compiler takes as input the .PPD file that you generate and all
  5964. the .PFM files referenced in that .PPD file. It then produces the .WPD file
  5965. needed for a printer to be supported by the Windows PostScript printer
  5966. driver.  %@NL@%
  5967.  
  5968. ────────────────────────────────────────────────────────────────────────────%@NL@%
  5969. NOTE
  5970.  
  5971. %@AI@%.PPD files must be standard ASCII files with CR/LF pairs terminating each
  5972. %@AI@%line.%@AE@%
  5973. ────────────────────────────────────────────────────────────────────────────%@NL@%
  5974.  
  5975.  
  5976. %@2@%%@CR:C6A00170005 @%%@AB@%17.4  The .PPD File Format%@AE@%%@EH@%%@NL@%
  5977.  
  5978. A .PPD file is an ASCII file with keywords at the start of every line. The
  5979. keywords that the current MKPRN compiler expects are listed in the following
  5980. section. In the future, more keywords may be recognized. For example, the
  5981. "*FileSystem" keyword may be used to determine if a printer supports fonts
  5982. loaded on a hard disk.  %@NL@%
  5983.  
  5984. Therefore, the .PPD file for your printer should be as complete as possible.
  5985. Refer to the Adobe document %@AI@%PostScript PRINTER DESCRIPTION FILES
  5986. %@AI@%Specification Version 3.0 %@AE@%and examine the sample .PPD files included in the
  5987. DDK for more information on .PPD files.  %@NL@%
  5988.  
  5989.  
  5990. %@2@%%@CR:C6A00170006 @%%@AB@%17.5  Keywords and Extensions%@AE@%%@EH@%%@NL@%
  5991.  
  5992. The following list provides descriptions of the PPD keywords:  %@NL@%
  5993.  
  5994. %@AB@%Keyword%@AE@%                           %@AB@%Description%@AE@%
  5995. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  5996. *NickName                         The name that appears in the printer 
  5997.                                   dialog box. It should be a unique 
  5998.                                   description of the printer. This is also
  5999.                                   the name used for automatic printer 
  6000.                                   recognition.
  6001.  
  6002. *ColorDevice                      Indicates whether or not the printer 
  6003.                                   supports color.
  6004.  
  6005. *FileSystem                       Currently unused but may be used in the 
  6006.                                   future.
  6007.  
  6008. *DefaultResolution                The default resolution of the printer.
  6009.  
  6010. *Transfer Normalized              The normalized transfer function used to
  6011.                                   generate linear gray levels. This must 
  6012.                                   be present. If none is
  6013.                                   required, include the NULL function "{ 
  6014.                                   }."
  6015.  
  6016. *PaperDimension                   The size of all the used paper types. A 
  6017.                                   Paper Dimension entry must be included 
  6018.                                   for every size of paper supported. 
  6019.                                   Notice that the sizes of the standard 
  6020.                                   page types should be used. Only standard
  6021.                                   page types are recognized (see the 
  6022.                                   following list).
  6023.  
  6024. *PageSize                         The PostScript code used to invoke the 
  6025.                                   different page sizes that are supported 
  6026.                                   (when not in manual-feed mode).
  6027.  
  6028. *PageRegion                       The PostScript code that is necessary to
  6029.                                   invoke different page sizes when using 
  6030.                                   manual feed.
  6031.  
  6032. *ImageableArea                    The actual area that can be marked on 
  6033.                                   for every paper size.
  6034.  
  6035. *ManualFeed True                  The PostScript code that is necessary to
  6036.                                   invoke the manual feed operation. If 
  6037.                                   present, it is assumed that manual feed 
  6038.                                   is supported (and, therefore, PageRegion
  6039.                                   entries must be included).
  6040.  
  6041. *ManualFeed False                 The PostScript code that is necessary to
  6042.                                   turn off manual feed. If present, it is 
  6043.                                   assumed that manual feed is supported.
  6044.  
  6045. %@AB@%Keyword%@AE@%                           %@AB@%Description%@AE@%
  6046. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  6047. *DefaultFont                      The name of the default font (i.e., the 
  6048.                                   font used if none is selected). This 
  6049.                                   entry must appear before any "*Font" 
  6050.                                   entries.
  6051.  
  6052. *Font                             The fonts resident in the printer.
  6053.  
  6054. *DefaultInputSlot                 The default input slot.
  6055.  
  6056. *InputSlot                        The PostScript code that is necessary to
  6057.                                   invoke each input slot.
  6058.  
  6059. Currently, there is only one keyword extension.  %@NL@%
  6060.  
  6061. %@AB@%Extension%@AE@%                         %@AB@%Description%@AE@%
  6062. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  6063. *EndOfFile                        Indicates whether or not ^D is required 
  6064.                                   to indicate EOF. This is true by default
  6065.                                   and only needs to be
  6066.                                   included if this is false (i.e., 
  6067.                                   "*EndOfFile False").
  6068.  
  6069. The following are the paper keywords used to show the paper sizes supported:
  6070. %@NL@%
  6071.  
  6072. %@AB@%Keyword%@AE@%                           %@AB@%Description%@AE@%
  6073. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  6074. Letter                            8 1/2 x 11 inches physical size. Refers 
  6075.                                   to the standard paper type.
  6076.  
  6077. LetterSmall                       8 1/2 x 11 inches physical size but with
  6078.                                   a reduced-size imageable region that is 
  6079.                                   centered on the page. Supports the Adobe
  6080.                                   PostScript paper definitions.
  6081.  
  6082. Tabloid                           11 x 17 inches physical size, oriented 
  6083.                                   in "portrait" or "tabloid" mode (i.e., 
  6084.                                   the y-axis is on the longer edge of the 
  6085.                                   paper).
  6086.  
  6087. Ledger                            17 x 11 inches physical size, oriented 
  6088.                                   in "landscape" mode (i.e., the y-axis is
  6089.                                   on the shorter edge of the paper). 
  6090.  
  6091. Legal                             8 1/2 x 14 inches physical size, 
  6092.                                   oriented in
  6093.                                   "portrait" mode.
  6094.  
  6095. Statement                         5 1/2 x 8 1/2 inches physical size, 
  6096.                                   oriented in
  6097.                                   "portrait" mode.
  6098.  
  6099. A3                                297 x 420 millimeters physical size, 
  6100.                                   oriented in
  6101.                                   "portrait" mode. Refers to the 
  6102.                                   International Standards Organization 
  6103.                                   (ISO)/(JIS) A3 paper size.
  6104.  
  6105. A4                                210 x 297 millimeters physical size, 
  6106.                                   oriented in
  6107.                                   "portrait" mode.
  6108.  
  6109. %@AB@%Keyword%@AE@%                           %@AB@%Description%@AE@%
  6110. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  6111. A4Small                           210 x 297 millimeters physical size but 
  6112.                                   with a reduced-size imageable area of 
  6113.                                   7.47 x 10.85 inches that is centered on 
  6114.                                   an A4 page. Supports the Adobe 
  6115.                                   PostScript paper definitions.
  6116.  
  6117. A5                                148 x 210 millimeters physical size, 
  6118.                                   oriented in
  6119.                                   "portrait" mode.
  6120.  
  6121. B4                                250 x 354 millimeters physical size, 
  6122.                                   oriented in "portrait" mode. Refers to 
  6123.                                   the Japanese Industrial Standard (JIS) 
  6124.                                   B4 paper size.
  6125.  
  6126. B5                                182 x 257 millimeters physical size, 
  6127.                                   oriented in
  6128.                                   "portrait" mode.
  6129.  
  6130. Folio                             8 1/2 x 13 inches physical size but with
  6131.                                   a reduced-size imageable region, 
  6132.                                   oriented in "portrait" mode and centered
  6133.                                   on the "folio" sheet. Supports the Adobe
  6134.                                   PostScript paper definitions.
  6135.  
  6136. Quarto                            215 x 275 millimeters physical size but 
  6137.                                   with a reduced-size imageable region, 
  6138.                                   oriented in "portrait" mode and centered
  6139.                                   on the "quarto" sheet.
  6140.  
  6141. 10x14                             10 x 14 inches physical size, oriented 
  6142.                                   in "portrait" mode.
  6143.  
  6144. 11x17                             11 x 17 inches physical size, oriented 
  6145.                                   in "portrait" mode. Can be used 
  6146.                                   interchangeably with the keyword Tabloid.
  6147.  
  6148. Note                              8 1/2 x 11 inches physical size but with
  6149.                                   a reduced-size imageable region. This is
  6150.                                   used to reduce the size of the page 
  6151.                                   buffer to give print jobs more memory.
  6152.  
  6153. LetterExtra                       9 1/2 x 12 inches physical size.
  6154.  
  6155. LegalExtra                        9 1/2 x 15 inches physical size.
  6156.  
  6157. TabloidExtra                      11.69 x 18 inches physical size.
  6158.  
  6159. A4Extra                           9.27 x 12.69 inches physical size.
  6160.  
  6161. For paper extensions, 5 standard envelope sizes are recognized. The two
  6162. groups of numbers following the word Envelope indicate the size of the
  6163. envelope in points (where each point equals 1/72 of an inch).  %@NL@%
  6164.  
  6165. %@AB@%Extension%@AE@%                         %@AB@%Description%@AE@%
  6166. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  6167. Envelope.279.639                  #9 Envelope (3 7/8 x 8 7/8 Inches) 
  6168.  
  6169. Envelope.297.684                  #10 Envelope (4 1/8 x 9 1/2 Inches) 
  6170.  
  6171. Envelope.324.747                  #11 Envelope (4 1/2 x 10 3/8 Inches) 
  6172.  
  6173. Envelope.342.792                  #12 Envelope (4 3/4 x 11 Inches) 
  6174.  
  6175. Envelope.360.828                  #14 Envelope (5 x 11 1/2 Inches) 
  6176.  
  6177. The following are the paper tray and bin keywords used to show and invoke
  6178. the input slots supported:  %@NL@%
  6179.  
  6180. %@AB@%Keyword%@AE@%                           %@AB@%Description%@AE@%
  6181. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  6182. Upper                             If there is more than one tray, this one
  6183.                                   is on top.
  6184.  
  6185. OnlyOne                           There is only one tray. 
  6186.  
  6187. Lower                             If there is more than one tray, this one
  6188.                                   is on the
  6189.                                   bottom.
  6190.  
  6191. Middle                            This one is in the middle.
  6192.  
  6193. LargeCapacity                     This one can hold more than a standard 
  6194.                                   amount of paper.
  6195.  
  6196. The following list describes the paper tray extensions:  %@NL@%
  6197.  
  6198. %@AB@%Extension%@AE@%                         %@AB@%Description%@AE@%
  6199. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  6200. AutoSelect                        Printer can select automatically which 
  6201.                                   feeder to use. This is followed by the 
  6202.                                   code (or a NULL command if no code is 
  6203.                                   required) that is used to invoke the 
  6204.                                   autofeed mechanism.
  6205.  
  6206. EnvelopeManual                    There is a manual envelope feeder. 
  6207.  
  6208. Envelope                          There is an envelope feeder. 
  6209.  
  6210. None                              There are no input feeders. This is 
  6211.                                   treated as being the same as OnlyOne.
  6212.  
  6213.  
  6214. %@2@%%@CR:C6A00170007 @%%@AB@%17.6  Running the MKPRN Compiler%@AE@%%@EH@%%@NL@%
  6215.  
  6216. MKPRN.EXE is an MS-DOS application that compiles .PPD files into .WPD files
  6217. that are read by the Microsoft Windows PostScript printer driver. The
  6218. command line usage is as follows:  %@NL@%
  6219.  
  6220. MKPRN [/v] [/s] file  %@NL@%
  6221.  
  6222. %@AB@%Parameter%@AE@%                         %@AB@%Description%@AE@%
  6223. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  6224. /v                                An optional verbose switch. This causes 
  6225.                                   MKPRN to print messages as it processes 
  6226.                                   various elements in the .PPD file. This 
  6227.                                   may be useful for debugging .PPD files.
  6228.  
  6229. %@AB@%/s%@AE@%                                Suppresses combining the .PSS, .CAP, and
  6230.                                   .DIR files into one .WPD file. This is 
  6231.                                   used only when building the driver 
  6232.                                   sources and is not intended for use by 
  6233.                                   external printers.
  6234.  
  6235. file                              This is the base filename (with no 
  6236.                                   extension) of the .PPD file to be 
  6237.                                   processed. The .WPD file shares this 
  6238.                                   base filename. 
  6239.  
  6240. Error messages are printed for fonts that are not found and for identifiers
  6241. that are not recognized. If fonts are not found, they are not built into the
  6242. .WPD file and have to be added as soft fonts as described in Chapter 16,
  6243. "WIN.INI Settings."  %@NL@%
  6244.  
  6245.  
  6246. %@2@%%@CR:C6A00170008 @%%@AB@%17.7  Installing the .WPD File%@AE@%%@EH@%%@NL@%
  6247.  
  6248. PostScript printer manufacturers can use the MKPRN.EXE utility to generate a
  6249. Windows Printer Description (WPD). They also need to create the PRINTERS.INI
  6250. file. These files can then be distributed to enable users to install
  6251. external printers on their machine.  %@NL@%
  6252.  
  6253. Once the .WPD file is available, an end user can install additional
  6254. PostScript printer support through the "Add Printer..." button in the
  6255. PostScript printer Setup dialog. This dialog can be activated from the
  6256. Control Panel's Printer icon or from any application that supports printer
  6257. Setup.  %@NL@%
  6258.  
  6259. When the user chooses this button, they are prompted to insert a disk or
  6260. type in a path to a directory that contains the .WPD file. If the
  6261. PRINTERS.INI file is found, the list of printers from which the user can
  6262. choose is displayed. The appropriate files are copied to the user's Windows
  6263. directory and the appropriate lines are added to the user's WIN.INI file.  %@NL@%
  6264.  
  6265. The PRINTERS.INI file should reside on the disk distributed with the .WPD
  6266. file. This file follows the standard format used in the Windows WIN.INI
  6267. file. The [PSCRIPT] section lists the PostScript printer names for each set
  6268. of .WPD files included on the disk. The string that follows is the full name
  6269. of the printer that will appear in the "Add Fonts..." Installation dialog
  6270. box.  %@NL@%
  6271.  
  6272. The format of the PRINTERS.INI file is shown in the following example:  %@NL@%
  6273.  
  6274. %@AS@%  [PSCRIPT] %@AE@%
  6275.  
  6276. %@AS@%  abc_ps = ABC PostScript Printer
  6277. %@AS@%  xyz_ps = XYZ PostScript Printer ver 43.1%@AE@%
  6278.  
  6279. If the user tries to install a printer that is already installed
  6280. (externally), the printer driver will ask whether or not the previous
  6281. description should be updated.  %@NL@%
  6282.  
  6283. Manufacturers that are already supported internally in the driver should not
  6284. provide external printer descriptions with names that conflict with those
  6285. used internally. If an update is required, add the PostScript version number
  6286. to the printer name (in both the PRINTERS.INI file and the "*NickName"
  6287. section of the .PPD file).  %@NL@%
  6288.  
  6289.  
  6290. %@2@%%@CR:C6A00170009 @%%@AB@%17.8  Limitations%@AE@%%@EH@%%@NL@%
  6291.  
  6292. Although there are over 60 font descriptions built into the PostScript
  6293. driver, printers with resident fonts that are not supported in the current
  6294. version of the driver will need to define those files as soft fonts.  %@NL@%
  6295.  
  6296. However, a soft font installer is not available yet for the PostScript
  6297. printer driver. Therefore, it is up to the printer manufacturer to install
  6298. additional fonts as soft fonts by adding the appropriate WIN.INI entries.
  6299. The format of soft font entries is described in Chapter 16, "WIN.INI
  6300. Settings."  %@NL@%
  6301.  
  6302.   %@NL@%
  6303.  
  6304.  
  6305.  
  6306.  
  6307.  
  6308.  
  6309. %@CR:C6A00180001 @%%@1@%%@AB@%Chapter 18  PostScript Printer Communications%@AE@%%@EH@%%@NL@%
  6310. %@AB@%────────────────────────────────────────────────────────────────────────────%@AE@%%@NL@%
  6311.  
  6312. Most PostScript printers support both serial and parallel ports. The fastest
  6313. and most efficient way to connect your printer to you PC is usually with a
  6314. parallel port (LPTx). If your printer has both a parallel and a serial port,
  6315. the parallel port should be used.  %@NL@%
  6316.  
  6317. If you are using serial communications and have a newer PostScript printer,
  6318. you may be able to increase the transmission rate from the standard 9600
  6319. baud. Many printers support communications of 19200 baud.  %@NL@%
  6320.  
  6321. The following is a PostScript program that can be sent to the printer to set
  6322. it up for 19200-baud communications. Save the following in a file called
  6323. 19200.PS and, then, use the MS-DOS %@AB@%Copy%@AE@% command (COPY 19200.PS COM1:) to
  6324. send it to the printer.  %@NL@%
  6325.  
  6326. %@AS@%  % set laserwriter for 19200 baud
  6327. %@AS@%  %   set up hardware handshaking
  6328. %@AS@%  %   see page 121-122 of apple manual for details
  6329. %@AS@%  %   use ETX/ACK (cts/rts)
  6330. %@AS@%  serverdict begin 0 exitserver
  6331. %@AS@%  statusdict begin 25 19200 7 setsccbatch end
  6332. %@AS@%  % a ^D should be appended to this file in most cases%@AE@%
  6333.  
  6334. ────────────────────────────────────────────────────────────────────────────%@NL@%
  6335. NOTE
  6336.  
  6337. %@AI@%This will set the speed permanently (even after a power cycle). Use the
  6338. %@AI@%following PostScript program to reset the communications channel to the
  6339. %@AI@%default 9600 baud. %@AE@%
  6340. ────────────────────────────────────────────────────────────────────────────%@NL@%
  6341.  
  6342. %@AS@%  % set laserwriter for 9600 baud
  6343. %@AS@%  %   set up hardware handshaking
  6344. %@AS@%  %   see page 121-122 of apple manual for details
  6345. %@AS@%  %   use ETX/ACK (cts/rts)
  6346. %@AS@%  serverdict begin 0 exitserver
  6347. %@AS@%  statusdict begin 25 9600 0 setsccbatch end
  6348. %@AS@%  % a ^D should be appended to this file in most cases%@AE@%
  6349.  
  6350. You will also have to set the port on the PC to this speed by issuing the
  6351. following command, which should go in your AUTOEXEC.BAT file:  %@NL@%
  6352.  
  6353. %@AS@%  MODE COM1:,19200,n,8,1 %@AE@%
  6354.  
  6355.  
  6356.  
  6357.