Tuesday, January 8, 2013

How Windows programs use printer drivers

All Microsoft Windows programs require the printer driver to paginate a document. Printer drivers measure font information, based on the particular font selected (Courier, Times New Roman, Arial, and so on), and the font’s point size. The driver applies values (in pixels) to each of the font elements such as the average character height, character width, height of the ascenders and descenders, internal leading, external leading, and maximum character width to name a few. True type fonts can be sized to any height that is accepted by the printer driver. True Type fonts are WYSIWYG (what you see is what you get) type fonts. This means that they can be printed exactly as they appear on the screen. For more information on True Type fonts, search the Windows online help.

When a particular font is selected, the Windows program executes a GetTextMetrics API call that queries the printer driver. The printer driver returns the TextMetric structure that contains the elements mentioned above and their assigned values. A structure exists for all fonts and all point sizes of a specific font. Now that the Windows application has all of the font information, it can assemble or paginate the document.

An inconsistency exists because different printer drivers measure the same font differently. For example, if a TrueType font is realized (measured) on two printers that use the same printer driver, and installed on the same version of Windows, the two fonts should have identical text metrics (the values, in pixels, of each of font elements should be the same). Problems could arise when you have:

• Two identical printers, but each one is using a different printer driver. Many printers can be driven using several different print drivers.

• Two different printers using the same printer driver. Some drivers can be used to drive several different printers.

• Two different printers using different printer drivers.

• One printer driver that uses the TrueType font while the other maps the TrueType font to a PostScript font (e.g. LaserJet in PCL mode versus LaserJet in Postscript mode).

• Two identical printers using the same printer drivers but each one is printing from a different version of Windows.

• Two identical printers where each printer is using the same printer driver, such as Hppcl5ms.drv, but the printer drivers are different versions.

• Two identical printers, two identical printer drivers, and two identical operating systems; however, the resolutions of the video drivers are different.

For example, a document using one printer driver may require six full lines to display a block of text; however, another printer driver that measures fonts narrower could result in the same block of text requiring less than six full lines. A third printer driver that measures fonts wider could require six full lines plus a seventh line to display the last one or two words.

No comments:
Write comments
Recommended Posts × +