NAP
Public Member Functions | Protected Member Functions | List of all members
Glyph Class Referencefinal

#include <glyph.h>

Public Member Functions

 Glyph ()=delete
 
 ~Glyph ()
 
 Glyph (const Glyph &other)=delete
 
Glyphoperator= (const Glyph &)=delete
 
 Glyph (Glyph &&other)=delete
 
Glyphoperator= (Glyph &&other)=delete
 
uint getIndex () const
 
bool isValid ()
 
int getHorizontalAdvance () const
 
int getVerticalAdvance () const
 
void * getHandle () const
 

Protected Member Functions

 Glyph (void *handle, uint index)
 

Description

Represents a symbol (character) in a font. This class wraps and manages 1 free-type Glyph character and is created by a FontInstance. The Glyph is destroyed when this object is destructed. Every Glyph can be represented using an IGLyphRepresentation. This allows for multiple interpretations of the same Glyph, for example a 2DTexture or 3Dmesh.

Constructor & Destructor Documentation

◆ Glyph() [1/4]

Glyph ( )
delete

◆ ~Glyph()

~Glyph ( )

Destructor, unloads and destroys the glyph if present

◆ Glyph() [2/4]

Glyph ( const Glyph other)
delete

◆ Glyph() [3/4]

Glyph ( Glyph &&  other)
delete

◆ Glyph() [4/4]

Glyph ( void *  handle,
uint  index 
)
protected

Only a font instance can create a glyph

Parameters
handleto the glyph in memory, should be of type FT_Glyph
indexthe index of the glyph in the font

Member Function Documentation

◆ getHandle()

void* getHandle ( ) const
Returns
handle to the free-type glyph object. Always of type: FT_Glyph!

◆ getHorizontalAdvance()

int getHorizontalAdvance ( ) const
Returns
horizontal glyph advance value in pixels

◆ getIndex()

uint getIndex ( ) const
Returns
the index of the Glyph inside the font

◆ getVerticalAdvance()

int getVerticalAdvance ( ) const
Returns
vertical glyph advance value in pixels

◆ isValid()

bool isValid ( )
Returns
if the Glyph represents a valid symbol / character

◆ operator=() [1/2]

Glyph& operator= ( const Glyph )
delete

◆ operator=() [2/2]

Glyph& operator= ( Glyph &&  other)
delete