| 54 | } |
| 55 | |
| 56 | bool 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 | |
| 73 | bool OvUI::Core::UIManager::UnloadFont(const std::string & p_id) |
| 74 | { |
no test coverage detected