Kodi Documentation  18.0
Kodi is an open source media player and entertainment hub.
CGUIFontTTFGL Class Reference

#include <GUIFontTTFGL.h>

Inheritance diagram for CGUIFontTTFGL:
CGUIFontTTFBase

Public Member Functions

 CGUIFontTTFGL (const std::string &strFileName)
 
 ~CGUIFontTTFGL (void) override
 
bool FirstBegin () override
 
void LastEnd () override
 
CVertexBuffer CreateVertexBuffer (const std::vector< SVertex > &vertices) const override
 
void DestroyVertexBuffer (CVertexBuffer &bufferHandle) const override
 
- Public Member Functions inherited from CGUIFontTTFBase
 CGUIFontTTFBase (const std::string &strFileName)
 
virtual ~CGUIFontTTFBase (void)
 
void Clear ()
 
bool Load (const std::string &strFilename, float height=20.0f, float aspect=1.0f, float lineSpacing=1.0f, bool border=false)
 
void Begin ()
 
void End ()
 
const std::string & GetFileName () const
 

Static Public Member Functions

static void CreateStaticVertexBuffers (void)
 
static void DestroyStaticVertexBuffers (void)
 

Protected Member Functions

CBaseTextureReallocTexture (unsigned int &newHeight) override
 
bool CopyCharToTexture (FT_BitmapGlyph bitGlyph, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2) override
 
void DeleteHardwareTexture () override
 
- Protected Member Functions inherited from CGUIFontTTFBase
void AddReference ()
 
void RemoveReference ()
 
float GetTextWidthInternal (vecText::const_iterator start, vecText::const_iterator end)
 
float GetCharWidthInternal (character_t ch)
 
float GetTextHeight (float lineSpacing, int numLines) const
 
float GetTextBaseLine () const
 
float GetLineHeight (float lineSpacing) const
 
float GetFontHeight () const
 
void DrawTextInternal (float x, float y, const std::vector< UTILS::Color > &colors, const vecText &text, uint32_t alignment, float maxPixelWidth, bool scrolling)
 
CharacterGetCharacter (character_t letter)
 
bool CacheCharacter (wchar_t letter, uint32_t style, Character *ch)
 
void RenderCharacter (float posX, float posY, const Character *ch, UTILS::Color color, bool roundX, std::vector< SVertex > &vertices)
 
void ClearCharacterCache ()
 
void SetGlyphStrength (FT_GlyphSlot slot, int glyphStrength)
 
unsigned int GetTextureLineHeight () const
 the height of each line in the texture. Accounts for spacing between lines to avoid characters overlapping. More...
 

Static Protected Attributes

static GLuint m_elementArrayHandle
 
- Static Protected Attributes inherited from CGUIFontTTFBase
static const unsigned int spacing_between_characters_in_texture = 1
 

Additional Inherited Members

- Static Protected Member Functions inherited from CGUIFontTTFBase
static void ObliqueGlyph (FT_GlyphSlot slot)
 
- Protected Attributes inherited from CGUIFontTTFBase
float m_height
 
std::string m_strFilename
 
CBaseTexturem_texture
 
unsigned int m_textureWidth
 
unsigned int m_textureHeight
 
int m_posX
 
int m_posY
 
UTILS::Color m_color
 
Characterm_char
 
Characterm_charquick [LOOKUPTABLE_SIZE]
 
int m_maxChars
 
int m_numChars
 
float m_ellipsesWidth
 
unsigned int m_cellBaseLine
 
unsigned int m_cellHeight
 
unsigned int m_nestedBeginCount
 
FT_Face m_face
 
FT_Stroker m_stroker
 
float m_originX
 
float m_originY
 
unsigned int m_nTexture
 
std::vector< CTranslatedVerticesm_vertexTrans
 
std::vector< SVertexm_vertex
 
float m_textureScaleX
 
float m_textureScaleY
 
std::string m_strFileName
 
XUTILS::auto_buffer m_fontFileInMemory
 
CGUIFontCache< CGUIFontCacheStaticPosition, CGUIFontCacheStaticValuem_staticCache
 
CGUIFontCache< CGUIFontCacheDynamicPosition, CGUIFontCacheDynamicValuem_dynamicCache
 
CRenderSystemBasem_renderSystem = nullptr
 

Constructor & Destructor Documentation

§ CGUIFontTTFGL()

CGUIFontTTFGL::CGUIFontTTFGL ( const std::string &  strFileName)
explicit

§ ~CGUIFontTTFGL()

CGUIFontTTFGL::~CGUIFontTTFGL ( void  )
override

Member Function Documentation

§ CopyCharToTexture()

bool CGUIFontTTFGL::CopyCharToTexture ( FT_BitmapGlyph  bitGlyph,
unsigned int  x1,
unsigned int  y1,
unsigned int  x2,
unsigned int  y2 
)
overrideprotectedvirtual

Implements CGUIFontTTFBase.

§ CreateStaticVertexBuffers()

void CGUIFontTTFGL::CreateStaticVertexBuffers ( void  )
static

§ CreateVertexBuffer()

CVertexBuffer CGUIFontTTFGL::CreateVertexBuffer ( const std::vector< SVertex > &  vertices) const
overridevirtual

Reimplemented from CGUIFontTTFBase.

§ DeleteHardwareTexture()

void CGUIFontTTFGL::DeleteHardwareTexture ( )
overrideprotectedvirtual

Implements CGUIFontTTFBase.

§ DestroyStaticVertexBuffers()

void CGUIFontTTFGL::DestroyStaticVertexBuffers ( void  )
static

§ DestroyVertexBuffer()

void CGUIFontTTFGL::DestroyVertexBuffer ( CVertexBuffer bufferHandle) const
overridevirtual

Reimplemented from CGUIFontTTFBase.

§ FirstBegin()

bool CGUIFontTTFGL::FirstBegin ( )
overridevirtual

Implements CGUIFontTTFBase.

§ LastEnd()

void CGUIFontTTFGL::LastEnd ( )
overridevirtual

Implements CGUIFontTTFBase.

§ ReallocTexture()

CBaseTexture * CGUIFontTTFGL::ReallocTexture ( unsigned int &  newHeight)
overrideprotectedvirtual

Implements CGUIFontTTFBase.

Member Data Documentation

§ m_elementArrayHandle

GLuint CGUIFontTTFGL::m_elementArrayHandle
staticprotected

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