[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'FPCanvas' (#fcl)

# TFPCustomFont

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TFPCustomFont - FreePascal base class for Fonts

## Declaration

Source position: fpcanvas.pp line 82

`type TFPCustomFont = class(TFPCanvasHelper)`
`protected`
`procedure DoCopyProps(); override;` |  | DoCopyProps - copies properties from another Canvas Helper
`procedure SetName(); virtual;` |  | SetName - specify the name of the Font
`procedure SetSize(); virtual;` |  | SetSize - specify the size for the Font
`public`
`function CopyFont;` |  | CopyFont - returns a copy of the font with all properties the same, but not allocated
`procedure GetTextSize();` |  | GetTextSize - finds the size (w: width, h: height) of the specified text in the current font
`function GetTextHeight();` |  | GetTextHeight - returns the height of the specified text
`function GetTextWidth();` |  | GetTextWidth - returns the width of the specified text
`property Name: String; [rw]` |  | The Name of the current Font
`property Size: Integer; [rw]` |  | The Size of the current Font
`property Bold: Boolean; [rw]` |  | Is the Font Bold?
`property Italic: Boolean; [rw]` |  | Is the Font Italic?
`property Underline: Boolean; [rw]` |  | Is the Font Underline?
`property StrikeTrough: Boolean; [rw]` |  | Is the Font StrikeTrough?
`end;`

## Inheritance

`TFPCustomFont` |  | TFPCustomFont - FreePascal base class for Fonts
`TFPCanvasHelper` |  | TFPCanvasHelper - FreePascal base class providing utilities for drawing and painting canvases
`TPersistent`
`TObject`

The latest version of this document can be found at lazarus-ccr.sourceforge.net .