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" 39 std::string fontFilePath;
48 FontMetadata(
const std::string& filename,
const std::set<std::string>& familyNames)
49 : m_filename{filename}, m_familyNames{familyNames}
53 std::string m_filename;
54 std::set<std::string> m_familyNames;
73 bool IsUpdating()
const {
return m_critSection.IsLocked(); }
77 void Unload(
const std::string& strFontName);
78 void LoadFonts(
const std::string& fontSet);
79 CGUIFont* LoadTTF(
const std::string& strFontName,
80 const std::string& strFilename,
81 UTILS::COLOR::Color textColor,
82 UTILS::COLOR::Color shadowColor,
86 float lineSpacing = 1.0f,
89 bool preserveAspect =
false);
90 CGUIFont* GetFont(
const std::string& strFontName,
bool fallback =
true);
96 CGUIFont* GetDefaultFont(
bool border =
false);
101 static void SettingOptionsFontsFiller(
const std::shared_ptr<const CSetting>& setting,
102 std::vector<StringSettingOption>& list,
103 std::string& current,
110 std::vector<std::string> GetUserFontsFamilyNames();
113 void ReloadTTFFonts();
118 bool preserveAspect);
119 void LoadFonts(
const TiXmlNode* fontNode);
120 CGUIFontTTF* GetFontFile(
const std::string& fontIdent);
121 static void GetStyle(
const TiXmlNode* fontNode,
int& iStyle);
123 std::vector<std::unique_ptr<CGUIFont>> m_vecFonts;
124 std::vector<std::unique_ptr<CGUIFontTTF>> m_vecFontFiles;
125 std::vector<OrigFontInfo> m_vecFontInfo;
127 bool m_canReload{
true};
130 void LoadUserFonts();
131 bool LoadFontsFromFile(
const std::string& fontsetFilePath,
132 const std::string& fontSet,
133 std::string& firstFontset);
135 mutable CCriticalSection m_critSection;
136 std::vector<FontMetadata> m_userFontsCache;
144 #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:35
Definition: IMsgTargetCallback.h:22
Definition: SettingDefinitions.h:85
Provide info of a resolution.
Definition: Resolution.h:66
Definition: GUIMessage.h:365
Definition: GUIFontManager.h:61
Definition: GUIFont.h:107
Definition: GraphicContext.h:60