PRB: Printer.Print May Use Different Fonts on Different Computers (244261)



The information in this article applies to:

  • Microsoft Visual Basic Enterprise Edition for Windows 5.0
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0
  • Microsoft Visual Basic Professional Edition for Windows 5.0
  • Microsoft Visual Basic Professional Edition for Windows 6.0
  • Microsoft Visual Basic Learning Edition for Windows 5.0
  • Microsoft Visual Basic Learning Edition for Windows 6.0

This article was previously published under Q244261

SYMPTOMS

Using Printer.Print without first setting Printer.FontName and Printer.FontSize may produce a printout in a different font when the same application is used on different computers or with different printers.

CAUSE

If you use Printer.Print without first setting Printer.FontName and Printer.FontSize, the operating system selects a font for you based on numerous parameters, including which fonts are installed and the characteristics of the output device.

RESOLUTION

Explicitly set Printer.FontName and Printer.FontSize before printing.

STATUS

This behavior is by design.

MORE INFORMATION

If you select an unavailable font, the operating system uses font substitution to select a font for you. To avoid this, check the Printer.Fonts property, which returns an array of all fonts that are supported for the current printer. See online Help for details.

REFERENCES

For additional information, click the article numbers below to view the articles in the Microsoft Knowledge Base:

194323 PRB: Setting Printer.Font.Size with StdFont Gives Wrong Values

168744 FIX: Printer May Lose Font Attributes


Modification Type:MajorLast Reviewed:5/12/2003
Keywords:kbFont kbprb kbprint KB244261