MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / LoadFont

Method LoadFont

Sources/OvUI/src/OvUI/Core/UIManager.cpp:56–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56bool OvUI::Core::UIManager::LoadFont(const std::string& p_id, const std::string & p_path, float p_fontSize)
57{
58 if (m_fonts.find(p_id) == m_fonts.end())
59 {
60 auto& io = ImGui::GetIO();
61 ImFont* fontInstance = io.Fonts->AddFontFromFileTTF(p_path.c_str(), p_fontSize);
62
63 if (fontInstance)
64 {
65 m_fonts[p_id] = fontInstance;
66 return true;
67 }
68 }
69
70 return false;
71}
72
73bool OvUI::Core::UIManager::UnloadFont(const std::string & p_id)
74{

Callers 3

SetupContextMethod · 0.80
ContextMethod · 0.80
ContextMethod · 0.80

Calls 4

AddFontFromFileTTFMethod · 0.80
c_strMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected