Elaztek Developer Hub
Blamite Game Engine - blam!  00406.12.10.23.1457.blamite
The core library for the Blamite Game Engine.
BlamFontGlyph Class Reference

Class representing a font glyph. More...

#include <fonts.h>

Public Member Functions

Ogre::HlmsDatablock * CreateCopiedDatablock ()
 Creates a copy of this glyph's datablock, intended to allow for it to be recolored on a per-instance basis. More...
 

Public Attributes

char character = 0x00
 The character that this glyph represents. More...
 
bool override_filtering = false
 Whether or not to override the font package texture filtering mode. More...
 
bool use_point_filtering = false
 Whether or not this glyph should use point filtering. More...
 
uint32_t width = 0
 The width of the glyph texture. More...
 
uint32_t height = 0
 The height of the glyph texture. More...
 
uint16_t index_x = 0
 The X index of the glyph within the font atlas texture. More...
 
uint16_t index_y = 0
 The Y index of the glyph within the font atlas texture. More...
 
BlamVector4 uv = { 0, 0, 0, 0 }
 The UV coordinates of the font glyph. More...
 
Ogre::TextureGpu * glyph_texture = nullptr
 The texture for the glyph. Only used in non-atlas bitmap fonts. More...
 
Ogre::HlmsDatablock * glyph_datablock = nullptr
 The datablock for the glyph. Only used in non-atlas bitmap fonts. More...
 

Detailed Description

Class representing a font glyph.

Font glyphs refer to any character that can be represented by a font package.

Member Function Documentation

◆ CreateCopiedDatablock()

Ogre::HlmsDatablock * BlamFontGlyph::CreateCopiedDatablock ( )

Creates a copy of this glyph's datablock, intended to allow for it to be recolored on a per-instance basis.

This method is only supported if this glyph's font package stores glyphs in separate bitmaps. For fonts which store glyphs in a single texture atlas, use the CreateCopiedDatablock method within BlamFontPackage instead.

Note
The copied datablock is not tracked internally, it is the responsibility of the caller to ensure the datablock is properly released.
Returns
The newly created datablock.

Member Data Documentation

◆ character

char BlamFontGlyph::character = 0x00

The character that this glyph represents.

◆ glyph_datablock

Ogre::HlmsDatablock* BlamFontGlyph::glyph_datablock = nullptr

The datablock for the glyph. Only used in non-atlas bitmap fonts.

◆ glyph_texture

Ogre::TextureGpu* BlamFontGlyph::glyph_texture = nullptr

The texture for the glyph. Only used in non-atlas bitmap fonts.

◆ height

uint32_t BlamFontGlyph::height = 0

The height of the glyph texture.

◆ index_x

uint16_t BlamFontGlyph::index_x = 0

The X index of the glyph within the font atlas texture.

◆ index_y

uint16_t BlamFontGlyph::index_y = 0

The Y index of the glyph within the font atlas texture.

◆ override_filtering

bool BlamFontGlyph::override_filtering = false

Whether or not to override the font package texture filtering mode.

◆ use_point_filtering

bool BlamFontGlyph::use_point_filtering = false

Whether or not this glyph should use point filtering.

This is only used if override_filtering is set to true.

◆ uv

BlamVector4 BlamFontGlyph::uv = { 0, 0, 0, 0 }

The UV coordinates of the font glyph.

◆ width

uint32_t BlamFontGlyph::width = 0

The width of the glyph texture.


The documentation for this class was generated from the following files: