Luanti 5.15.0-dev
 
Loading...
Searching...
No Matches
gui::SGUITTGlyph Struct Reference

Structure representing a single TrueType glyph. More...

#include <CGUITTFont.h>

Public Member Functions

 SGUITTGlyph ()
 
 ~SGUITTGlyph ()
 
bool isLoaded () const
 If true, the glyph has been loaded.
 
void preload (u32 char_index, FT_Face face, CGUITTFont *parent, u32 font_size, const FT_Int32 loadFlags)
 Preload the glyph.
 
void unload ()
 Unloads the glyph.
 
video::IImage * createGlyphImage (const FT_Bitmap &bits, video::IVideoDriver *driver) const
 Creates the IImage object from the FT_Bitmap.
 

Public Attributes

u32 glyph_page
 The page the glyph is on.
 
core::recti source_rect
 The source rectangle for the glyph.
 
core::vector2di offset
 The offset of glyph when drawn.
 
core::vector2di advance
 Glyph advance information.
 

Detailed Description

Structure representing a single TrueType glyph.

Constructor & Destructor Documentation

◆ SGUITTGlyph()

gui::SGUITTGlyph::SGUITTGlyph ( )
inline

◆ ~SGUITTGlyph()

gui::SGUITTGlyph::~SGUITTGlyph ( )
inline

References unload().

+ Here is the call graph for this function:

Member Function Documentation

◆ createGlyphImage()

video::IImage * gui::SGUITTGlyph::createGlyphImage ( const FT_Bitmap & bits,
video::IVideoDriver * driver ) const

Creates the IImage object from the FT_Bitmap.

References errorstream, FATAL_ERROR, x, and y.

Referenced by gui::CGUITTFont::getGlyphIndexByChar().

+ Here is the caller graph for this function:

◆ isLoaded()

bool gui::SGUITTGlyph::isLoaded ( ) const
inline

If true, the glyph has been loaded.

References source_rect.

Referenced by gui::CGUITTFont::getGlyphIndexByChar().

+ Here is the caller graph for this function:

◆ preload()

void gui::SGUITTGlyph::preload ( u32 char_index,
FT_Face face,
CGUITTFont * parent,
u32 font_size,
const FT_Int32 loadFlags )

Preload the glyph.

References advance, gui::CGUITTGlyphPage::available_slots, gui::CGUITTFont::createGlyphPage(), gui::CGUITTFont::getLastGlyphPage(), gui::CGUITTFont::getLastGlyphPageIndex(), glyph_page, offset, source_rect, gui::CGUITTGlyphPage::texture, gui::CGUITTGlyphPage::used_slots, and warningstream.

Referenced by gui::CGUITTFont::getGlyphIndexByChar().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unload()

void gui::SGUITTGlyph::unload ( )

Unloads the glyph.

References source_rect.

Referenced by ~SGUITTGlyph().

+ Here is the caller graph for this function:

Member Data Documentation

◆ advance

core::vector2di gui::SGUITTGlyph::advance

Glyph advance information.

Referenced by preload().

◆ glyph_page

u32 gui::SGUITTGlyph::glyph_page

The page the glyph is on.

Referenced by gui::CGUITTFont::draw(), gui::CGUITTFont::getGlyphIndexByChar(), and preload().

◆ offset

core::vector2di gui::SGUITTGlyph::offset

The offset of glyph when drawn.

Referenced by gui::CGUITTFont::draw(), and preload().

◆ source_rect

core::recti gui::SGUITTGlyph::source_rect

The source rectangle for the glyph.

Referenced by gui::CGUITTFont::draw(), isLoaded(), preload(), and unload().


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