Microsoft KB Archive/164374

= FIX: Cannot Use Printer Fonts with ? Printing in VFP 5.0 =

Article ID: 164374

Article Last Modified on 10/16/2002

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a

-



This article was previously published under Q164374



SYMPTOMS
Using the SET PRINTER FONT command to print with a printer font is ignored when printing with question marks (?). Instead of a using the specified printer font, Visual FoxPro 5.0 substitutes a soft font. Printing with @...SAY commands also ignores the specified the printer font. However, using @...SAY commands with the SET DEVICE to PRINTER command causes an error in Visual FoxPro for Windows 5.0. This error is unrelated to this printer font issue.

This feature works properly in Visual FoxPro 3.0b.



RESOLUTION
As a workaround, use a soft font that closely emulates the look of the desired printer font.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3.

For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed



MORE INFORMATION
In the example below, the LaserJet printer driver is used because the LinePrinter font is available with that printer.

Steps to Reproduce Behavior
 Install an HP LaserJet printer driver and set it as the default printer.  Create a program file and add the following code: SET PRINTER FONT "LinePrinter" SET PRINTER ON     ? "This should be Printer Font" ? "but it prints in a proportional font." ? "IIIII" ? "WWWWW" SET PRINTER TO                           

After the example code runs, notice that the "I" and "W" characters appear. In a non-proportional font, each character takes up the same amount of printer space. Since the characters are not printed with the non- proportional LinePrinter font, the two letters take up a differing amount of space on the paper.

