mirror of
https://github.com/Maschell/libgui-sdl.git
synced 2024-11-04 15:25:09 +01:00
23 lines
451 B
C++
23 lines
451 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <SDL2/SDL_rwops.h>
|
|
#include <map>
|
|
#include <gui/video/SDL_FontCache.h>
|
|
#include <gui/video/Renderer.h>
|
|
|
|
class GuiFont {
|
|
public:
|
|
GuiFont(const uint8_t *buffer, size_t buffer_size, Renderer *renderer);
|
|
~GuiFont();
|
|
|
|
FC_Font *getFont(int32_t size);
|
|
|
|
|
|
private:
|
|
std::map<int32_t, FC_Font *> font_cache;
|
|
std::map<int32_t, TTF_Font *> ttf_font_cache;
|
|
SDL_RWops *rw;
|
|
Renderer *renderer;
|
|
};
|