ScaleHelperDefaultFont Property

Practically gets the same value as Control.DefaultFont, but the result of this property is always in points that can be scaled correctly.

Definition

Namespace: KGySoft.WinForms
Assembly: KGySoft.WinForms (in KGySoft.WinForms.dll) Version: 5.0.1
C#
public static Font DefaultFont { get; }

Property Value

Font

Remarks

  Note

This property may return different fonts on .NET Framework and .NET [Core], just like the Control.DefaultFont property. Use this property only to ensure to get a correctly scalable version of Control.DefaultFont. If you target both .NET Framework and .NET [Core] and you want to use the same font on both platforms, set the Font property of your forms explicitly. You can use the SystemFonts.MessageBoxFont property, which returns the same font on both platforms (though this may not be the case on Mono or Wine), and returns a correctly scalable Font in points.

See Also