blob: 7d157ed9494b0d28e1e331a7172824d3df74870b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include "../../include/mglpp/graphics/Font.hpp"
#include <string.h>
namespace mgl {
Font::Font() {
memset(&font, 0, sizeof(font));
}
Font::~Font() {
mgl_font_unload(&font);
}
bool Font::load_from_file(const char *filepath, unsigned int font_size) {
if(font.texture.id)
return false;
return mgl_font_load_from_file(&font, filepath, font_size) == 0;
}
mgl_font* Font::internal_font() {
return &font;
}
}
|