Class TCastleFontFamily
Unit
CastleFonts
Declaration
type TCastleFontFamily = class(TCastleAbstractFont)
Description
Font family, with possible different subfonts for Regular, Bold, Italic, BoldItalic variants.
It can be generally used everywhere where we allow TCastleAbstractFont, and in most cases it will just act like the Regular variant. But it is especialy useful together with TCastleLabel.Html = True
. In such case, using it as TCastleLabel.CustomFont will allow to render HTML text with varying font styles, this way bold/italic requested by HTML like <b>something bold</b> <i>something italic</i>
will be visible.
Similar to TCustomizedFont, it can also change the subfont size. Simply set the Size
property of this instance to non-zero to force the specific size of all the underlying subfonts. You can also change the subfont outline, if CustomizeOutline is used. The underlying font properties remain unchanged for subfonts (so they can be still used for other purposes, directly or by other TCustomizedFont or TCastleFontFamily
wrappers).
Hierarchy
Overview
Methods
Properties
Description
Methods
 |
procedure Notification(AComponent: TComponent; Operation: TOperation); override; |
|
 |
constructor Create(AOwner: TComponent); override; |
|
 |
destructor Destroy; override; |
|
 |
function FontLoaded: Boolean; override; |
|
 |
procedure PrepareResources; override; |
|
 |
procedure Print(const X, Y: Single; const Color: TCastleColor; const S: string); override; |
|
 |
function TextWidth(const S: string): Single; override; |
|
 |
function TextHeight(const S: string): Single; override; |
|
 |
function TextHeightBase(const S: string): Single; override; |
|
 |
function TextMove(const S: string): TVector2; override; |
|
 |
function EffectiveSize: Single; override; |
|
Properties
 |
property InternalBold: boolean read FInternalBold write FInternalBold default false; |
|
 |
property InternalItalic: boolean read FInternalItalic write FInternalItalic default false; |
|
 |
property CustomizeOutline: boolean read FCustomizeOutline write FCustomizeOutline default false; |
Should we customize the outline of the underlying font.
|
 |
property RegularFont: TCastleAbstractFont read FRegular write SetRegular; deprecated 'use Regular'; |
Warning: this symbol is deprecated: use Regular |
 |
property BoldFont: TCastleAbstractFont read FBold write SetBold; deprecated 'use Bold'; |
Warning: this symbol is deprecated: use Bold |
 |
property ItalicFont: TCastleAbstractFont read FItalic write SetItalic; deprecated 'use Italic'; |
Warning: this symbol is deprecated: use Italic |
 |
property BoldItalicFont: TCastleAbstractFont read FBoldItalic write SetBoldItalic; deprecated 'use BoldItalic'; |
Warning: this symbol is deprecated: use BoldItalic |
Generated by PasDoc 0.16.0.