#pragma once #include #include #include #include #include namespace scwx { namespace qt { namespace manager { class FontManager : public QObject { Q_OBJECT Q_DISABLE_COPY_MOVE(FontManager) public: explicit FontManager(); ~FontManager(); std::shared_mutex& imgui_font_atlas_mutex(); std::uint64_t imgui_fonts_build_count() const; std::shared_ptr GetImGuiFont(types::FontCategory fontCategory); std::shared_ptr LoadImGuiFont(const std::string& family, const std::vector& styles, units::font_size::points size, bool loadIfNotFound = true); void LoadApplicationFont(const std::string& filename); void InitializeFonts(); static QFont GetQFont(types::FontCategory fontCategory); static FontManager& Instance(); private: class Impl; std::unique_ptr p; }; } // namespace manager } // namespace qt } // namespace scwx