#pragma once #include "engine_api.h" #include "resource.hpp" #include "gfx.hpp" #include #include namespace engine::resources { class ENGINE_API Font : public Resource { public: Font(const std::filesystem::path& resPath); ~Font() override; struct CharData { glm::vec2 atlas_top_left{}; glm::vec2 atlas_bottom_right{}; glm::vec2 char_top_left{}; glm::vec2 char_bottom_right{}; float xAdvance{}; }; const gfx::Texture* getAtlasTexture(); CharData getCharData(uint32_t charCode); private: const gfx::Texture* m_atlas; std::map m_charData; }; }