Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CGUIFontTTFGL Class Reference

#include <GUIFontTTFGL.h>

Inheritance diagram for CGUIFontTTFGL:
CGUIFontTTF

Public Member Functions

 CGUIFontTTFGL (const std::string &fontIdent)
 
 ~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 CGUIFontTTF
virtual ~CGUIFontTTF ()
 
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 & GetFontIdent () const
 

Static Public Member Functions

static void CreateStaticVertexBuffers (void)
 
static void DestroyStaticVertexBuffers (void)
 
- Static Public Member Functions inherited from CGUIFontTTF
static CGUIFontTTFCreateGUIFontTTF (const std::string &fontIdent)
 

Protected Member Functions

std::unique_ptr< CTextureReallocTexture (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 CGUIFontTTF
 CGUIFontTTF (const std::string &fontIdent)
 
void AddReference ()
 
void RemoveReference ()
 
std::vector< GlyphGetHarfBuzzShapedGlyphs (const vecText &text)
 
float GetTextWidthInternal (const vecText &text)
 
float GetTextWidthInternal (const vecText &text, const std::vector< Glyph > &glyph)
 
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 (CGraphicContext &context, float x, float y, const std::vector< KODI::UTILS::COLOR::Color > &colors, const vecText &text, uint32_t alignment, float maxPixelWidth, bool scrolling, float dx=0.0f, float dy=0.0f)
 
CharacterGetCharacter (character_t letter, FT_UInt glyphIndex)
 
bool CacheCharacter (FT_UInt glyphIndex, uint32_t style, Character *ch)
 
void RenderCharacter (CGraphicContext &context, float posX, float posY, const Character *ch, KODI::UTILS::COLOR::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.
 
unsigned int GetMaxFontHeight () const
 

Static Protected Attributes

static GLuint m_elementArrayHandle {0}
 

Additional Inherited Members

- Static Protected Member Functions inherited from CGUIFontTTF
static void ObliqueGlyph (FT_GlyphSlot slot)
 
- Protected Attributes inherited from CGUIFontTTF
float m_height {0.0f}
 
std::unique_ptr< CTexturem_texture
 
unsigned int m_textureWidth {0}
 
unsigned int m_textureHeight {0}
 
int m_posX {0}
 
int m_posY {0}
 
KODI::UTILS::COLOR::Color m_color {KODI::UTILS::COLOR::NONE}
 
std::vector< Characterm_char
 
Characterm_charquick [LOOKUPTABLE_SIZE] {nullptr}
 
bool m_ellipseCached {false}
 
float m_ellipsesWidth {0.0f}
 
unsigned int m_cellBaseLine {0}
 
unsigned int m_cellHeight {0}
 
unsigned int m_maxFontHeight {0}
 
unsigned int m_nestedBeginCount {0}
 
FT_Face m_face {nullptr}
 
FT_Stroker m_stroker {nullptr}
 
hb_font_t * m_hbFont {nullptr}
 
float m_originX {0.0f}
 
float m_originY {0.0f}
 
unsigned int m_nTexture {0}
 
std::vector< CTranslatedVerticesm_vertexTrans
 
std::vector< SVertexm_vertex
 
float m_textureScaleX {0.0f}
 
float m_textureScaleY {0.0f}
 
const std::string m_fontIdent
 
std::vector< uint8_tm_fontFileInMemory
 
CGUIFontCache< CGUIFontCacheStaticPosition, CGUIFontCacheStaticValuem_staticCache
 
CGUIFontCache< CGUIFontCacheDynamicPosition, CGUIFontCacheDynamicValuem_dynamicCache
 
CRenderSystemBasem_renderSystem
 

Constructor & Destructor Documentation

◆ CGUIFontTTFGL()

CGUIFontTTFGL::CGUIFontTTFGL ( const std::string & fontIdent)
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 CGUIFontTTF.

◆ CreateStaticVertexBuffers()

void CGUIFontTTFGL::CreateStaticVertexBuffers ( void )
static

◆ CreateVertexBuffer()

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

Reimplemented from CGUIFontTTF.

◆ DeleteHardwareTexture()

void CGUIFontTTFGL::DeleteHardwareTexture ( )
overrideprotectedvirtual

Implements CGUIFontTTF.

◆ DestroyStaticVertexBuffers()

void CGUIFontTTFGL::DestroyStaticVertexBuffers ( void )
static

◆ DestroyVertexBuffer()

void CGUIFontTTFGL::DestroyVertexBuffer ( CVertexBuffer & bufferHandle) const
overridevirtual

Reimplemented from CGUIFontTTF.

◆ FirstBegin()

bool CGUIFontTTFGL::FirstBegin ( )
overridevirtual

Implements CGUIFontTTF.

◆ LastEnd()

void CGUIFontTTFGL::LastEnd ( )
overridevirtual

Implements CGUIFontTTF.

◆ ReallocTexture()

std::unique_ptr< CTexture > CGUIFontTTFGL::ReallocTexture ( unsigned int & newHeight)
overrideprotectedvirtual

Implements CGUIFontTTF.

Member Data Documentation

◆ m_elementArrayHandle

GLuint CGUIFontTTFGL::m_elementArrayHandle {0}
staticprotected

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