Microsoft KB Archive/311271

= Font selection in a PDT =

Article ID: 311271

Article Last Modified on 12/4/2007

-

APPLIES TO


 * Microsoft SNA Server 3.0 Service Pack 4
 * Microsoft SNA Server 4.0
 * Microsoft Host Integration Server 2000 Standard Edition
 * Microsoft Host Integration Server 2004 Standard Edition

-



This article was previously published under Q311271



SUMMARY
In some circumstances it may be necessary to use a Printer Definition File compiled to a Printer Definition Table (PDT) to control print output. Setting and defining fonts can be problematic in that changing the font characteristics in a PDT may not be reflected in the printed output as expected. This is due to the printer ignoring commands that are inappropriate in the current circumstances. This is by design. It is important, therefore, to understand how fonts are defined.

In a printer control language (PCL) environment, fonts have a distinct set of parameters that must be set in a sequential manner. A font is described by symbol set, spacing, height, pitch, style, stroke weight, typeface family, and orientation. If, for example, a particular font is chosen whose characteristics do not fit in the default symbol set, then the default font or another font may be used. To ensure that the expected font will be used it is best practice to fully qualify or describe the font.



MORE INFORMATION
To fully describe a font the characteristics must be defined in the previously mentioned order: symbol set, spacing, and so on. Code strings that have identical leading characters may use a continuation character instead of a termination character and be added together. The continuation character is usually the value of the lower case letter with the termination character being the value of the upper case letter.

As an example, to send a font command sequence to the printer to set the following

Symbol Set = ASCII

Spacing = fixed

Pitch = 10 CPI

Height = 8.5

Style = Upright

Stroke Weight = Medium

Typeface = Line Printer

these codes would be used:

Note that most of the sequences start with an &quot;ESC(s&quot; or &quot;1B 28 73&quot;. The entire string can be compressed by concatenating the codes leading with &quot;28 73&quot;. The termination characters must also be converted to their respective lowercase values with the exception of the final value.

The resultant string is:

ESC(U ESC(sp10h8.5vsbT

-or-

1B 28 55 1B 28 73 70 31 30 68 38 2E 35 76 73 62 54

This is the code that would be placed in a macro and the macro would be referred to in the Start_Job line. The macros in the Start_Job line will be sent to the printer when a job is started. Frequently it is easier to create a set of macros and then call individual macros, bearing in mind that the macros must be called in the specified order, and even then unexpected results may occur.

More detailed information on creating Printer Definition Files is available in the SNA Print Service white paper, which is available at the following Microsoft Web site:

http://www.microsoft.com/hiserver/evaluation/previousversions/snatechinfo.asp

