Microsoft KB Archive/84483

= PRB: VB Uses Bitmap Fonts When TrueType FontSize < 7 Points =

Article ID: 84483

Article Last Modified on 12/12/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 1.0 Standard Edition

-



This article was previously published under Q84483



SYMPTOMS
The Microsoft Windows version 3.1 operating environment provides you with TrueType scalable fonts that can be used in Microsoft Visual Basic for Windows applications. Visual Basic for Windows supports TrueType fonts for font sizes of 7 points or greater -- depending on the video driver installed. Smaller fonts are mapped to available bitmap fonts, based on the fonts available for the video driver installed.



CAUSE
This is not a problem with Visual Basic for Windows. This is how Windows manages fonts. This is expected behavior in Windows when using TrueType fonts that are less than 7 points in size.



STATUS
This behavior is by design. There is no way to force Visual Basic for Windows to use TrueType fonts for font sizes less than 7 points.



MORE INFORMATION
Microsoft Windows version 3.1 uses automatic bitmap font substitution, which is done to preserve readability at small sizes. At very small point sizes (4 to 7 points on standard VGA video resolutions), most Type 2 fonts are substituted with a hand-tuned bitmap font to preserve readability. This can cause the style of the font to change. For example, the Times New Roman font shipped with Windows version 3.1 appears as the Small Fonts font for sizes 4 - 6 and MS Serif for sizes 6.25 - 8.25, rather than its native face it has at larger sizes.

The program below demonstrates this. The program attempts to print a message using the Arial font in sizes from 1 to 9. Visual Basic for Windows uses the font Small Fonts for font sizes less than 7 and depending on the video driver installed may use Arial for sizes between 7 and 8.25. Using the standard VGA driver, Arial is used for fonts sizes greater then 8.25.

Steps to Reproduce This Behavior
 Start a new project in Visual Basic for Windows. Form1 is created by default.  Enter the following code into the Form_Click procedure: Sub Form_Click For i = 1 To 9 Step .25 FontName = &quot;Arial&quot; FontSize = i        Print Str$(i); Chr$(9); Str$(FontSize); Chr$(9); FontName Next i  End Sub  Press the F5 key to run the program, and click the form. Notice that the Arial TrueType font is used only for font sizes of 8.25 or larger.

Additional query words: 2.00 3.00 3.10

Keywords: kbprb KB84483

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.