GxFont.Create

Fore Syntax

Create(FamilyName: String; Size: Double; [Style: GxFontStyle = 0;] [Unit: GxUnit = 3]);

Fore.NET Syntax

Create(FamilyName: String; Size: Double; Style: Prognoz.Platform.Interop.Drawing.GxFontStyle; Unit: Prognoz.Platform.Interop.Drawing.GxUnit);

Parameters

FamilyName. Font name.

Size. Font size.

Style. Font style. Optional parameter, standard font is used by default.

Unit. Font size measurement units. Optional parameter, font size is measured in points by default.

Description

The Create constructor creates a font with specified parameters.

NOTE. Any units available in GxUnit can be used as font size measurement units except for GxUnit.Display.

Fore Example

Function GetFont: IGxFont;
Var
    OutFont: IGxFont;
Begin
    OutFont := New GxFont.Create("Arial"12, GxFontStyle.Bold, GxUnit.Point);
    Return OutFont;
End Function GetFont;

The specified procedure returns font with specified parameters.

Fore.NET Example

Imports Prognoz.Platform.Interop.Drawing;

Function GetFont(): GxFont;
Var
    OutFont: GxFont = New GxFontClass();
Begin
    OutFont.Create("Arial"12, GxFontStyle.gfsBold, GxUnit.guPoint);
    Return OutFont;
End Function;

The specified procedure returns font with specified parameters.

See also:

GxFont