|
Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
|
#include <GUIFontTTF.h>
Classes | |
| struct | Character |
| struct | CTranslatedVertices |
| struct | Glyph |
| struct | RunInfo |
Public Member Functions | |
| 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 () |
| virtual CVertexBuffer | CreateVertexBuffer (const std::vector< SVertex > &vertices) const |
| virtual void | DestroyVertexBuffer (CVertexBuffer &bufferHandle) const |
| const std::string & | GetFontIdent () const |
Static Public Member Functions | |
| static CGUIFontTTF * | CreateGUIFontTTF (const std::string &fontIdent) |
Protected Types | |
| enum class | FontFace { Primary , Emoji , Symbols } |
Protected Member Functions | |
| CGUIFontTTF (const std::string &fontIdent) | |
| void | AddReference () |
| void | RemoveReference () |
| std::vector< Glyph > | GetHarfBuzzShapedGlyphs (std::span< const character_t > text) |
| float | GetTextWidthInternal (std::span< const character_t > text) |
| float | GetTextWidthInternal (std::span< const character_t > text, const std::vector< Glyph > &glyph) |
| size_t | GetFittingLengthInternal (std::span< const character_t > text, float maxPixelWidth) |
| 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, std::span< const KODI::UTILS::COLOR::Color > colors, std::span< const character_t > text, uint32_t alignment, float maxPixelWidth, bool hScrolling, bool vScrolling, float dx=0.0f, float dy=0.0f, bool shadow=false) |
| Character * | GetCharacter (character_t letter, FT_UInt glyphIndex, FontFace fontFace=FontFace::Primary, bool silhouette=false) |
| bool | CacheCharacter (FT_UInt glyphIndex, uint32_t style, FontFace fontFace, bool silhouette, 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 () |
| virtual std::unique_ptr< CTexture > | ReallocTexture (unsigned int &newHeight)=0 |
| virtual bool | CopyCharToTexture (const uint8_t *pixels, unsigned int pitch, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2)=0 |
| virtual void | DeleteHardwareTexture ()=0 |
| void | FillNewTexture (CTexture &newTexture) const |
| void | WriteCharPixels (const uint8_t *pixels, unsigned int pitch, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2) |
| 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 Member Functions | |
| static void | ClearTexturePixels (uint8_t *pixels, size_t size) |
| static void | ObliqueGlyph (FT_GlyphSlot slot) |
Friends | |
| class | CGUIFont |
|
strongprotected |
|
virtual |
|
explicitprotected |
|
protected |
| void CGUIFontTTF::Begin | ( | ) |
|
protected |
| void CGUIFontTTF::Clear | ( | ) |
|
protected |
|
protectedpure virtual |
Implemented in CGUIFontTTFDX, CGUIFontTTFGL, and CGUIFontTTFGLES.
|
static |
|
inlinevirtual |
Reimplemented in CGUIFontTTFDX, CGUIFontTTFGL, and CGUIFontTTFGLES.
|
protectedpure virtual |
Implemented in CGUIFontTTFDX, CGUIFontTTFGL, and CGUIFontTTFGLES.
|
inlinevirtual |
Reimplemented in CGUIFontTTFDX, CGUIFontTTFGL, and CGUIFontTTFGLES.
|
protected |
| void CGUIFontTTF::End | ( | ) |
|
protected |
|
protected |
|
protected |
|
inlineprotected |
|
inline |
|
protected |
|
protected |
|
protected |
|
inlineprotected |
|
protected |
|
protected |
the height of each line in the texture. Accounts for spacing between lines to avoid characters overlapping.
|
protected |
|
protected |
| bool CGUIFontTTF::Load | ( | const std::string & | strFilename, |
| float | height = 20.0f, | ||
| float | aspect = 1.0f, | ||
| float | lineSpacing = 1.0f, | ||
| bool | border = false ) |
|
staticprotected |
|
protectedpure virtual |
Implemented in CGUIFontTTFDX, CGUIFontTTFGL, and CGUIFontTTFGLES.
|
protected |
|
protected |
|
protected |
|
protected |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |