Version

GetFontForZoomFactor Method

Create a font from a base font and a zoom factor. If the zoom factor is equal to 1, this method simply returns the base font.
Syntax
'Declaration
 
Public Shared Function GetFontForZoomFactor( _
   ByVal baseFont As Font, _
   ByVal zoomFactor As Single, _
   ByVal disposeBaseFont As Boolean _
) As Font
public static Font GetFontForZoomFactor( 
   Font baseFont,
   float zoomFactor,
   bool disposeBaseFont
)

Parameters

baseFont
The base font.
zoomFactor
The zoom factor.
disposeBaseFont
Whether or not to dispose the base font if we end up creating a new one.

Return Value

A font with the appropriate size based on the base font size and the zoom factor.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also