xbmc
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
GUIFontManager Class Reference
Inheritance diagram for GUIFontManager:
Inheritance graph
[legend]
Collaboration diagram for GUIFontManager:
Collaboration graph
[legend]

Public Member Functions

void Initialize ()
 Initialize the font manager. Checks that fonts cache are up to date, otherwise update it.
 
bool IsUpdating () const
 
bool OnMessage (CGUIMessage &message) override
 
void Unload (const std::string &strFontName)
 
void LoadFonts (const std::string &fontSet)
 
CGUIFontLoadTTF (const std::string &strFontName, const std::string &strFilename, UTILS::COLOR::Color textColor, UTILS::COLOR::Color shadowColor, const int iSize, const int iStyle, bool border=false, float lineSpacing=1.0f, float aspect=1.0f, const RESOLUTION_INFO *res=nullptr, bool preserveAspect=false)
 
CGUIFontGetFont (const std::string &strFontName, bool fallback=true)
 
CGUIFontGetDefaultFont (bool border=false)
 return a default font More...
 
void Clear ()
 
void FreeFontFile (CGUIFontTTF *pFont)
 
std::vector< std::string > GetUserFontsFamilyNames ()
 Get the list of user fonts as family names from cache. More...
 

Static Public Member Functions

static void SettingOptionsFontsFiller (const std::shared_ptr< const CSetting > &setting, std::vector< StringSettingOption > &list, std::string &current, void *data)
 

Protected Member Functions

void ReloadTTFFonts ()
 
void LoadFonts (const TiXmlNode *fontNode)
 
CGUIFontTTFGetFontFile (const std::string &fontIdent)
 

Static Protected Member Functions

static void RescaleFontSizeAndAspect (CGraphicContext &context, float *size, float *aspect, const RESOLUTION_INFO &sourceRes, bool preserveAspect)
 
static void GetStyle (const TiXmlNode *fontNode, int &iStyle)
 

Protected Attributes

std::vector< std::unique_ptr< CGUIFont > > m_vecFonts
 
std::vector< std::unique_ptr< CGUIFontTTF > > m_vecFontFiles
 
std::vector< OrigFontInfom_vecFontInfo
 
RESOLUTION_INFO m_skinResolution
 
bool m_canReload {true}
 

Member Function Documentation

◆ GetDefaultFont()

CGUIFont * GUIFontManager::GetDefaultFont ( bool  border = false)

return a default font

Parameters
borderwhether the font should be a font with an outline
Returns
the font. nullptr if no default font can be found.

◆ GetUserFontsFamilyNames()

std::vector< std::string > GUIFontManager::GetUserFontsFamilyNames ( )

Get the list of user fonts as family names from cache.

Returns
The list of available fonts family names

◆ LoadFonts()

void GUIFontManager::LoadFonts ( const TiXmlNode *  fontNode)
protected
Todo:
Why do we tolower() this shit?

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