Microsoft KB Archive/22296

Calculating Wtps for Fixed Width Fonts

PSS ID Number: Q22296 Article last modified on 11-02-1994

1.x 2.x 3.x

MS-DOS

Question:

How is the Wtps value in the Font Description Tables of the PRD calculated for fixed width fonts?

Response:

Wtps is the width of the character in units of dxaMin. If PrinterType is anything but 5 (i.e., for all printers except laser printers) the formula for calculating the correct Wtps entries is 1440/C.P.I/dxaMin. The value for C.P.I. must come from the printer documentation. Keep in mind that C.P.I. is not always 120/point size, so make sure to get C.P.I. directly from the printer documentation rather than trying to calculate it from the point size.

For example, the Epson MX manual says that the double width font is 16 pt., 5 C.P.I. for all faces (normal, bold, italic, bold-italic). Our formula then gives 1440/5/12 = 24. The Wtps entry would then be “Wtps:24 24 24 24”.

If PrinterType is 5 (laser printer), then the formula for calculating the correct Wtps entries is dxaMin/C.P.I. For example, the Courier font for the HP Laserjet is 10 C.P.I. for all faces. The formula for laser printers gives 300/10 = 30. The Wtps entry would then be “Wtps:30 30 30 30”.

KBCategory: kbprint KBSubcategory: Additional reference words:

=
================================================================ Copyright Microsoft Corporation 1994.