Class TCastleFontFamily

Unit

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

Protected procedure Notification(AComponent: TComponent; Operation: TOperation); override;
Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public function PropertySections(const PropertyName: String): TPropertySections; override;
Public function FontLoaded: Boolean; override;
Public procedure PrepareResources; override;
Public procedure Print(const X, Y: Single; const Color: TCastleColor; const S: string); override;
Public function TextWidth(const S: string): Single; override;
Public function TextHeight(const S: string): Single; override;
Public function TextHeightBase(const S: string): Single; override;
Public function TextMove(const S: string): TVector2; override;
Public function EffectiveSize: Single; override;

Properties

Public property InternalBold: boolean read FInternalBold write FInternalBold default false;
Public property InternalItalic: boolean read FInternalItalic write FInternalItalic default false;
Public property CustomizeOutline: boolean read FCustomizeOutline write FCustomizeOutline default false;
Public property RegularFont: TCastleAbstractFont read FRegular write SetRegular; deprecated 'use Regular';
Public property BoldFont: TCastleAbstractFont read FBold write SetBold; deprecated 'use Bold';
Public property ItalicFont: TCastleAbstractFont read FItalic write SetItalic; deprecated 'use Italic';
Public property BoldItalicFont: TCastleAbstractFont read FBoldItalic write SetBoldItalic; deprecated 'use BoldItalic';
Published property Regular: TCastleAbstractFont read FRegular write SetRegular;
Published property Bold: TCastleAbstractFont read FBold write SetBold;
Published property Italic: TCastleAbstractFont read FItalic write SetItalic;
Published property BoldItalic: TCastleAbstractFont read FBoldItalic write SetBoldItalic;

Description

Methods

Protected procedure Notification(AComponent: TComponent; Operation: TOperation); override;
 
Public constructor Create(AOwner: TComponent); override;
 
Public destructor Destroy; override;
 
Public function PropertySections(const PropertyName: String): TPropertySections; override;
 
Public function FontLoaded: Boolean; override;
 
Public procedure PrepareResources; override;
 
Public procedure Print(const X, Y: Single; const Color: TCastleColor; const S: string); override;
 
Public function TextWidth(const S: string): Single; override;
 
Public function TextHeight(const S: string): Single; override;
 
Public function TextHeightBase(const S: string): Single; override;
 
Public function TextMove(const S: string): TVector2; override;
 
Public function EffectiveSize: Single; override;
 

Properties

Public property InternalBold: boolean read FInternalBold write FInternalBold default false;
 
Public property InternalItalic: boolean read FInternalItalic write FInternalItalic default false;
 
Public property CustomizeOutline: boolean read FCustomizeOutline write FCustomizeOutline default false;

Should we customize the outline of the underlying font.

Public property RegularFont: TCastleAbstractFont read FRegular write SetRegular; deprecated 'use Regular';

Warning: this symbol is deprecated: use Regular

 
Public property BoldFont: TCastleAbstractFont read FBold write SetBold; deprecated 'use Bold';

Warning: this symbol is deprecated: use Bold

 
Public property ItalicFont: TCastleAbstractFont read FItalic write SetItalic; deprecated 'use Italic';

Warning: this symbol is deprecated: use Italic

 
Public property BoldItalicFont: TCastleAbstractFont read FBoldItalic write SetBoldItalic; deprecated 'use BoldItalic';

Warning: this symbol is deprecated: use BoldItalic

 
Published property Regular: TCastleAbstractFont read FRegular write SetRegular;
 
Published property Bold: TCastleAbstractFont read FBold write SetBold;
 
Published property Italic: TCastleAbstractFont read FItalic write SetItalic;
 
Published property BoldItalic: TCastleAbstractFont read FBoldItalic write SetBoldItalic;
 

Generated by PasDoc 0.16.0.