In the MS-Mincho and MS-Gothic fonts provided in the HP LaserJet 4PJ, font metric calculation is somewhat easier than for the Latin-based fonts. Width calculations are easier because all characters of these fonts conform to one of two different character widths at a particular point size. The characters are either considered full-width or half- width. One-byte characters are always half-width and two-byte characters are always full-width.

Full-width characters occupy the entire EM width at a particular point size. Half-width characters occupy half of an EM width. The following equations show how to calculate the EM width and character widths for a full-width and a half-width character.

ppem = round (DeviceResolution * PointSize/72) FullWidthDeltaX = round (ppem * PCLUnits/ DeviceResolution) HalfWidthDeltaX=round ((ppem/2) * PCLUnits/DeviceResolution)

where:

ppem = EM width in pixels

DeviceResolution = current device resolution in dots per inch (600 or 300dpi)

PointSize = point size requested

FullWidthDeltaX = character width of full-width character in PCL Units

HalfWidthDeltaX = character width of half-width character in PCL Units

PCLUnits = PCL Units

The PCL Unit of measure is explained in more detail in the PCL 5 Technical Reference Manual. The default PCL Unit size is 1/300th of an inch, but the Unit of Measure command can be used to set the PCL Unit size to other values.

Note that HalfWidthDeltaX may not be exactly half of FullWidthDeltaX because of rounding. For example, if FullWidthDeltaX = round(99.0) = 99, then the corresponding HalfWidthDeltaX = round(99.0/2) = round(49.5) = 50.

Printer-Specific Differences 2-51