TFont class
Represents a font used to draw text in an application.
Declaration
TFont = class(TFPCustomFont)Inheritance
- TFont
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
FontData | public | Contains the data describing the font. |
Handle | public | Operating system Handle for the Font. |
IsMonoSpace | public | Indicates if the font uses fixed-width characters (monospace). |
PixelsPerInch | public | Display density for the font. |
Reference | public | Reference - References made to this Font. |
CharSet | published | Indicates the character set used in the font. |
Color | published | Color used to render text using the font. |
Height | published | Height for the font (in pixels). |
Name | published | Name of the font. |
Orientation | published | Rotation for the current font in 1/10ths of a degree. |
Pitch | published | Pitch type of the Font. |
Quality | published | Output quality for the Font, such as anti-aliasing. |
Size | published | Vertical size for the font in Points. |
Style | published | Styles applied to the font face. |
Methods
GetCharSet | protected | Gets the value for the CharSet property. |
GetHeight | protected | Gets the value for the Height property. |
GetPitch | protected | Gets the value for the Pitch property. |
GetStyle | protected | Gets the value for the Style property. |
Changed | protected | Checks for pending updates (if there are any, returns True) or calls inherited Changed. |
DoAllocateResources | protected | DoAllocateResources - calls inherited method then calls GetReference. |
DoCopyProps | protected | DoCopyProps - calls inherited method; if From argument is another Font, copies specified properties directly. |
DoDeAllocateResources | protected | DoDeAllocateResources - frees references then calls inherited method. |
SetCharSet | protected | Sets the value for the CharSet property. |
SetColor | protected | Sets the value for the Color property. |
GetColor | protected | Gets the value for the Color property. |
SetFlags | protected | Sets the value for an indexed style flag. |
SetFPColor | protected | Sets the font Color to the specified TFPColor value. |
SetHeight | protected | Sets the value for the Height property. |
SetName | protected | Sets the value for the Name property. |
SetOrientation | protected | Sets the value for the Orientation property. |
SetPitch | protected | Sets the value for the Pitch property. |
SetSize | protected | SetSize - if AValue is a new size, frees the old reference, calls the inherited method, performs the appropriate rounding and sets the Changed property. |
SetStyle | protected | SetStyle - specify which style to use. |
SetQuality | protected | SetQuality - specify the quality. |
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
Assign | public | Copies values from Source to the current class instance. |
BeginUpdate | public | Starts an update process for the class instance. |
EndUpdate | public | Finishes an update process for the class instance. |
HandleAllocated | public | HandleAllocated - returns True if a handle has been allocated. |
IsDefault | public | IsDefault - returns True if this is the default Font. |
IsEqual | public | IsEqual - returns True if this Font is the same as the specified Font. |
IsHorizontal | public | Determines whether the font runs in horizontal direction, either normal or upside down. |
IsVertical | public | Indicates whether the font is rotated by +/-90 degrees |
SetDefault | public | Sets font properties to their default values. |
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
