8 #include "Mountain/core.hpp" 9 #include "Mountain/rendering/gpu_texture.hpp" 15 class Font :
public Resource
19 MOUNTAIN_API
static constexpr std::array<const char_t*, 1>
FileExtensions 24 DEFAULT_COPY_MOVE_OPERATIONS(
Font)
27 using Resource::Resource;
29 MOUNTAIN_API ~
Font()
override;
37 MOUNTAIN_API
Vector2 CalcTextSize(std::string_view text)
const;
48 std::map<char_t, Character> m_Characters;
54 void Unload()
override;
static MOUNTAIN_API constexpr std::array< const char_t *, 1 > FileExtensions
Allowed extensions for font files.
Defines the Mountain::Resource class.
Low-level interface for OpenGL textures.
MOUNTAIN_API bool_t SetSourceData(const Pointer< File > &file, uint32_t size)
This also loads the font.
Custom Mountain smart pointer. Represents both a std::shared_ptr and a std::weak_ptr.
MOUNTAIN_API void ResetSourceData() override
This also unloads the font.
Holds the necessary information to draw text using a Font.
The Draw class contains static functions to draw various things on screen.
Contains all declarations of the Mountain Framework.