Castle Game Engine: CastleFonts: Class TTextureFont

# Class TTextureFont
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleFonts ## Declaration `type TTextureFont = class(TCastleFont)` ## Description 2D font using a texture initialized from a FreeType font file. This can load a font file, or it can use ready data in TTextureFontData. The latter allows to use this for fonts embedded in a Pascal source code, since our texturefont2pascal can convert a font ttf to a unit that defines ready TTextureFontData instance. ## Hierarchy TObject TCastleFont TTextureFont ## Overview ### Methods
| `constructor Create(const URL: string; const ASize: Integer; const AnAntiAliased: boolean; const ACharacters: TUnicodeCharList = nil);`
| `constructor Create(const URL: string; const ASize: Integer; const AnAntiAliased: boolean; const ACharacters: TSetOfChars); deprecated;`
| `constructor Create(const Data: TTextureFontData; const OwnsData: boolean = false);`
| `destructor Destroy; override;`
| `procedure GLContextOpen; override;`
| `procedure GLContextClose; override;`
| `procedure Print(const X, Y: Integer; const Color: TCastleColor; const S: string); override;`
| `function TextWidth(const S: string): Integer; override;`
| `function TextHeight(const S: string): Integer; override;`
| `function TextHeightBase(const S: string): Integer; override;`
| `function TextMove(const S: string): TVector2Integer; override;`
## Description ### Methods
| `constructor Create(const URL: string; const ASize: Integer; const AnAntiAliased: boolean; const ACharacters: TUnicodeCharList = nil);`
Create by reading a FreeType font file, like ttf. Providing charaters list as `Nil` means that we only create glyphs for SimpleAsciiCharacters, which includes only the basic ASCII characters. The ACharacters instance does not become owned by this object, so remember to free it after calling this constructor.
| `constructor Create(const URL: string; const ASize: Integer; const AnAntiAliased: boolean; const ACharacters: TSetOfChars); deprecated;`
Warning: this symbol is deprecated.
| `constructor Create(const Data: TTextureFontData; const OwnsData: boolean = false);`
Create from a ready TTextureFontData instance. ###### Parameters Data TTextureFontData instance containing loaded image and glyphs parameters. OwnsData If `True`, the Data instance becomes owned by this class (will be freed in our constructor). Usually you do not want this, since usually you pass Data from a unit generated by texturefont2pascal. In this case, the finalization of CastleTextureFont_Xxx unit will already free the TTextureFontData instance.
| `destructor Destroy; override;`
| `procedure GLContextOpen; override;`
| `procedure GLContextClose; override;`
| `procedure Print(const X, Y: Integer; const Color: TCastleColor; const S: string); override;`
| `function TextWidth(const S: string): Integer; override;`
| `function TextHeight(const S: string): Integer; override;`
| `function TextHeightBase(const S: string): Integer; override;`
| `function TextMove(const S: string): TVector2Integer; override;`
Generated by PasDoc 0.13.0 on 2015-06-15 04:43:09