Class TFontStyleNode

Unit

Declaration

type TFontStyleNode = class(TAbstractFontStyleNode)

Description

Defines the size, family, style and other properties used for TTextNode.

Hierarchy

Overview

Nested Types

Published TFontEvent = procedure (const FontStyle: TFontStyleNode; var Font: TTextureFontData) of object;

Fields

Public nested const DefaultSize = 1.0;
Public nested const DefaultSpacing = 1.0;
Public nested const DefaultFamily = ffSerif;
Public nested const DefaultBold = false;
Public nested const DefaultItalic = false;
Public nested const DefaultJustify = fjBegin;
Public nested const DefaultJustifyMinor = fjFirst;
Public nested const DefaultBlending = true;
Public class var OnFont: TFontEvent;

Methods

Public procedure CreateNode; override;
Public class function ClassX3DType: string; override;
Public class function URNMatching(const URN: string): boolean; override;
Public class function ForVRMLVersion(const Version: TX3DVersion): boolean; override;

Properties

Public property FdFamily: TMFString read FFdFamily;
Public property Family: TX3DFontFamily read GetFamily write SetFamily;
Public property FdHorizontal: TSFBool read FFdHorizontal;
Public property FdJustify: TMFString read FFdJustify;
Public property Justify: TX3DFontJustify read GetJustify write SetJustify;
Public property JustifyMinor: TX3DFontJustify read GetJustifyMinor write SetJustifyMinor;
Public property FdLanguage: TSFString read FFdLanguage;
Public property FdLeftToRight: TSFBool read FFdLeftToRight;
Public property FdSize: TSFFloat read FFdSize;
Public property FdSpacing: TSFFloat read FFdSpacing;
Public property FdStyle: TSFString read FFdStyle;
Public property Bold: boolean read GetBold write SetBold;
Public property Italic: boolean read GetItalic write SetItalic;
Public property FdTopToBottom: TSFBool read FFdTopToBottom;
Public property FdBlending: TSFBool read FFdBlending;
Public property Blending: boolean read GetBlending write SetBlending;
Public property Horizontal: boolean read GetHorizontal write SetHorizontal;
Public property Language: string read GetLanguage write SetLanguage;
Public property LeftToRight: boolean read GetLeftToRight write SetLeftToRight;
Public property Size: Single read GetSize write SetSize;
Public property Spacing: Single read GetSpacing write SetSpacing;
Public property TopToBottom: boolean read GetTopToBottom write SetTopToBottom;

Description

Nested Types

Published TFontEvent = procedure (const FontStyle: TFontStyleNode; var Font: TTextureFontData) of object;
 

Fields

Public nested const DefaultSize = 1.0;
 
Public nested const DefaultSpacing = 1.0;
 
Public nested const DefaultFamily = ffSerif;
 
Public nested const DefaultBold = false;
 
Public nested const DefaultItalic = false;
 
Public nested const DefaultJustify = fjBegin;
 
Public nested const DefaultJustifyMinor = fjFirst;
 
Public nested const DefaultBlending = true;
 
Public class var OnFont: TFontEvent;

Adjust the font used for a given FontStyle node. Assign here a callback which can modify a font. You can look at any font style properties to decide how to adjust the font, like Bold, Italic, Family.

You can always decide to leave the given "Font" instance at the default value, or to modify it.

The font instance set here is a TTextureFontData instance. You can load it from a TTF file by TTextureFontData.Create, or you can assign here a TTextureFontData instance defined by a unit generated by texture-font-to-pascal. See https://castle-engine.io/tutorial_text.php about using texture-font-to-pascal. In the first case, remember that it is your resposibility to free this font later, but only after all possible Text nodes using this font are destroyed.

Methods

Public procedure CreateNode; override;
 
Public class function ClassX3DType: string; override;
 
Public class function URNMatching(const URN: string): boolean; override;
 
Public class function ForVRMLVersion(const Version: TX3DVersion): boolean; override;
 

Properties

Public property FdFamily: TMFString read FFdFamily;
 
Public property Family: TX3DFontFamily read GetFamily write SetFamily;
 
Public property FdHorizontal: TSFBool read FFdHorizontal;
 
Public property FdJustify: TMFString read FFdJustify;
 
Public property Justify: TX3DFontJustify read GetJustify write SetJustify;
 
Public property JustifyMinor: TX3DFontJustify read GetJustifyMinor write SetJustifyMinor;
 
Public property FdLanguage: TSFString read FFdLanguage;
 
Public property FdLeftToRight: TSFBool read FFdLeftToRight;
 
Public property FdSize: TSFFloat read FFdSize;
 
Public property FdSpacing: TSFFloat read FFdSpacing;
 
Public property FdStyle: TSFString read FFdStyle;
 
Public property Bold: boolean read GetBold write SetBold;
 
Public property Italic: boolean read GetItalic write SetItalic;
 
Public property FdTopToBottom: TSFBool read FFdTopToBottom;
 
Public property FdBlending: TSFBool read FFdBlending;
 
Public property Blending: boolean read GetBlending write SetBlending;
 
Public property Horizontal: boolean read GetHorizontal write SetHorizontal;
 
Public property Language: string read GetLanguage write SetLanguage;
 
Public property LeftToRight: boolean read GetLeftToRight write SetLeftToRight;
 
Public property Size: Single read GetSize write SetSize;
 
Public property Spacing: Single read GetSpacing write SetSpacing;
 
Public property TopToBottom: boolean read GetTopToBottom write SetTopToBottom;
 

Generated by PasDoc 0.15.0.