Microsoft KB Archive/23112

Function of Byte:28 in PCSDs in PRDs

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

1.x 2.x 3.x

MS-DOS

Question:

How is byte:28 in the PCSD section of the PRD used?

Response:

The “set character spacing” sequence (byte:28) in the PCSD section of the PRDs is used when Word needs to create a blank space between words and the space is not a whole multiple of normal space characters. For instance, to create a 1.25-inch left margin, Word can send 12 normal 10-pitch space characters to do the 1.2 inches. But to do the remaining .05 inch, Word needs to know what special command can be issued to the printer to make the printhead move an amount smaller than a normal space. Virtually all printers have a command that will make their printhead move in increments smaller than a normal space character.

Another example of when byte:28 would be used is when Word is trying to justify a line of text, and microspace justification is being used. Microspace justification means “in any one line, make all spaces between words equal width.” Suppose the text is formatted to be justified, a fixed width font (10 pitch) is being used, so 60 10-pitch characters will fit on each 6-inch line. There are 11 words on a particular line (so 10 blank areas between pairs) with a total of 46 characters (total width 4.6 inches). This leaves a total of 14 10-pitch characters (1.4 inches) on the line left for the blank areas between words. Since these blank areas must all be of equal width, each blank area must have the width of 1.4 ten pitch characters (.14 inch). Word sends a word to the printer, and then one normal ten pitch space. But somehow Word must then make the printhead move the width of .4 of a ten pitch character (.04 inch). Again, Word will refer to byte:28 to see what command it can give the printer to move the printhead in an increment smaller than a normal space.

When Word realizes it needs to tell the printhead to move in an increment smaller than a normal space, Word refers to the the dxaMin and the mod for byte:28 in order to calculate the correct parameter that the printer will understand as the intended amount of movement. Word then issues to the printer the control sequence specified at byte:28 followed by the calculated parameter. The printer receives the command and moves the printhead the specified amount. Word then proceeds to send the next item of text.

KBCategory: kbother KBSubcategory: Additional reference words:

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