Sign in Join
FPDoc Onlineexperiment

TFont.Create constructor

Member of TFontpublicIn unit Graphics

Constructor for the class instance.

Declaration

pascal
constructor Create; override

Description

Create is the overridden constructor in TFont. Create calls the inherited constructor on entry, and sets the default values for properties including:

Color
Set to clDefault for platforms or widgetsets where it is enabled. Otherwise, set to clWindowText.
Pitch
Set to the value in DefFontData.
Charset
Set to the value in DefFontData.
Quality
Set to the value in DefFontData.
Height
Set to the value in DefFontData.
Style
Set to the value in DefFontData.
PixelsPerInch
Set to the vertical display density used in ScreenInfo.
Size
Calculated using values in Height and PixelsPerInch. Applied by calling the SetSize method inherited from TFPCustomFont.
Name
Set to the value in DefFontData, and applied by calling the SetName name method inherited from TFPCustomFont.
FPColor
Calls the SetFPColor method inherited from TFPCanvasHelper to set the font color to colBlack.

The DelayAllocate property from the TFPCanvasHelper ancestor is set to True to defer resource allocation for the Canvas until it is used.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.