43typedef std::pair<std::string, float> FontDescription;
46typedef std::pair<ImFont*, float> FontWithSize;
60 {
return m_fonts[desc]; }
66 std::map<FontDescription, ImFont*> m_fonts;
72 bool hide_text_after_double_hash =
false,
73 float wrap_width = -1.0f);
ImVec2 CalcTextSizeForFont(FontWithSize font, const char *text, bool hide_text_after_double_hash=false, float wrap_width=-1.0f)
Wrapper around ImGui::CalcTextSize that uses an explicit font.
Definition: FontManager.cpp:143
Definition: FontManager.h:49
void AddFontDescriptions(PreferenceCategory &cat, std::set< FontDescription > &fonts)
Get the font descriptions for each preference category.
Definition: FontManager.cpp:119
bool UpdateFonts(PreferenceCategory &root)
Check for changes to our fonts and, if any are found, reload.
Definition: FontManager.cpp:55
ImFont * GetFont(FontDescription desc)
Gets the font, if any, for the provided description.
Definition: FontManager.h:59
Definition: PreferenceTree.h:133