Use dynamically sized ImGui fonts

This commit is contained in:
Dan Paulat 2025-08-27 23:43:11 -05:00
parent dc96e3e3ad
commit c82b9753c6
12 changed files with 89 additions and 88 deletions

View file

@ -28,18 +28,20 @@ public:
std::shared_mutex& imgui_font_atlas_mutex();
int GetFontId(types::Font font) const;
std::shared_ptr<types::ImGuiFont>
std::pair<std::shared_ptr<types::ImGuiFont>, units::font_size::pixels<int>>
GetImGuiFont(types::FontCategory fontCategory);
QFont GetQFont(types::FontCategory fontCategory);
std::shared_ptr<types::ImGuiFont>
LoadImGuiFont(const std::string& family,
const std::vector<std::string>& styles,
units::font_size::points<double> size,
bool loadIfNotFound = true);
LoadImGuiFont(const std::string& family,
const std::vector<std::string>& styles,
bool loadIfNotFound = true);
void LoadApplicationFont(types::Font font, const std::string& filename);
void InitializeFonts();
static units::font_size::pixels<int>
ImFontSize(units::font_size::pixels<double> size);
static FontManager& Instance();
private: