17 #include "threads/CriticalSection.h" 18 #include "threads/SingleLock.h" 19 #include "utils/ColorUtils.h" 20 #include "utils/GlobalsHandling.h" 21 #include "windowing/GraphicContext.h" 38 std::string fontFilePath;
47 FontMetadata(
const std::string& filename,
const std::string& familyName)
48 : m_filename{filename}, m_familyName{familyName}
52 std::string m_filename;
53 std::string m_familyName;
72 bool IsUpdating()
const {
return m_critSection.IsLocked(); }
76 void Unload(
const std::string& strFontName);
77 void LoadFonts(
const std::string& fontSet);
78 CGUIFont* LoadTTF(
const std::string& strFontName,
79 const std::string& strFilename,
80 UTILS::COLOR::Color textColor,
81 UTILS::COLOR::Color shadowColor,
85 float lineSpacing = 1.0f,
88 bool preserveAspect =
false);
89 CGUIFont* GetFont(
const std::string& strFontName,
bool fallback =
true);
95 CGUIFont* GetDefaultFont(
bool border =
false);
100 static void SettingOptionsFontsFiller(
const std::shared_ptr<const CSetting>& setting,
101 std::vector<StringSettingOption>& list,
102 std::string& current,
109 std::vector<std::string> GetUserFontsFamilyNames();
112 void ReloadTTFFonts();
117 bool preserveAspect);
118 void LoadFonts(
const TiXmlNode* fontNode);
119 CGUIFontTTF* GetFontFile(
const std::string& fontIdent);
120 static void GetStyle(
const TiXmlNode* fontNode,
int& iStyle);
122 std::vector<std::unique_ptr<CGUIFont>> m_vecFonts;
123 std::vector<std::unique_ptr<CGUIFontTTF>> m_vecFontFiles;
124 std::vector<OrigFontInfo> m_vecFontInfo;
126 bool m_canReload{
true};
129 void LoadUserFonts();
131 mutable CCriticalSection m_critSection;
132 std::vector<FontMetadata> m_userFontsCache;
140 #define g_fontManager XBMC_GLOBAL_USE(GUIFontManager) Definition: XBMCTinyXML.h:33
Definition: GUIFontTTF.h:76
Setting base class containing all the properties which are common to all settings independent of the ...
Definition: Setting.h:46
Definition: GUIFontManager.h:34
Definition: IMsgTargetCallback.h:22
Definition: SettingDefinitions.h:85
Provide info of a resolution.
Definition: Resolution.h:66
Definition: GUIMessage.h:365
Definition: GUIFontManager.h:60
Definition: GUIFont.h:107
Definition: GraphicContext.h:60