Sign in Join
FPDoc Onlineexperiment

TFont class

In unit Graphics

Represents a font used to draw text in an application.

Declaration

pascal
TFont = class(TFPCustomFont)

Inheritance

  1. TFont
  2. TFPCustomFont

Descends from it: TControlFont

Description

TFont is a TFPCustomFont descendant, and provides properties and methods needed to represent a font used in an LCL application.

Most of the information about the font is provided in a TFontData instance used in protected methods like GetData and SetData. Data items in the structure are exposed as properties, and includes: CharSet, Color, Height,Name, Orientation, Pitch, Quality, Size, and Style.

The Reference property provides access to the font Handle in the widgetset implementation.

Properties

FontDatapublicContains the data describing the font.
HandlepublicOperating system Handle for the Font.
IsMonoSpacepublicIndicates if the font uses fixed-width characters (monospace).
PixelsPerInchpublicDisplay density for the font.
ReferencepublicReference - References made to this Font.
CharSetpublishedIndicates the character set used in the font.
ColorpublishedColor used to render text using the font.
HeightpublishedHeight for the font (in pixels).
NamepublishedName of the font.
OrientationpublishedRotation for the current font in 1/10ths of a degree.
PitchpublishedPitch type of the Font.
QualitypublishedOutput quality for the Font, such as anti-aliasing.
SizepublishedVertical size for the font in Points.
StylepublishedStyles applied to the font face.

Methods

GetCharSetprotectedGets the value for the CharSet property.
GetHeightprotectedGets the value for the Height property.
GetPitchprotectedGets the value for the Pitch property.
GetStyleprotectedGets the value for the Style property.
ChangedprotectedChecks for pending updates (if there are any, returns True) or calls inherited Changed.
DoAllocateResourcesprotectedDoAllocateResources - calls inherited method then calls GetReference.
DoCopyPropsprotectedDoCopyProps - calls inherited method; if From argument is another Font, copies specified properties directly.
DoDeAllocateResourcesprotectedDoDeAllocateResources - frees references then calls inherited method.
SetCharSetprotectedSets the value for the CharSet property.
SetColorprotectedSets the value for the Color property.
GetColorprotectedGets the value for the Color property.
SetFlagsprotectedSets the value for an indexed style flag.
SetFPColorprotectedSets the font Color to the specified TFPColor value.
SetHeightprotectedSets the value for the Height property.
SetNameprotectedSets the value for the Name property.
SetOrientationprotectedSets the value for the Orientation property.
SetPitchprotectedSets the value for the Pitch property.
SetSizeprotectedSetSize - if AValue is a new size, frees the old reference, calls the inherited method, performs the appropriate rounding and sets the Changed property.
SetStyleprotectedSetStyle - specify which style to use.
SetQualityprotectedSetQuality - specify the quality.
CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
AssignpublicCopies values from Source to the current class instance.
BeginUpdatepublicStarts an update process for the class instance.
EndUpdatepublicFinishes an update process for the class instance.
HandleAllocatedpublicHandleAllocated - returns True if a handle has been allocated.
IsDefaultpublicIsDefault - returns True if this is the default Font.
IsEqualpublicIsEqual - returns True if this Font is the same as the specified Font.
IsHorizontalpublicDetermines whether the font runs in horizontal direction, either normal or upside down.
IsVerticalpublicIndicates whether the font is rotated by +/-90 degrees
SetDefaultpublicSets font properties to their default values.

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