hibiscus/core/resources/font.cpp

23 lines
430 B
C++

#include "font.hpp"
#include "../pragmautil.hpp"
namespace hibis {
Font::Font(FT_Library& lib, const char* path, u_int16_t size) {
int err = FT_New_Face(lib, path, 0, &mFontFace);
if (err) {
TODO("Error message involving `int err`");
}
setFontSize(size);
mPath = path;
}
Font::~Font() {}
void Font::setFontSize(u_int16_t newSize) {
FT_Set_Pixel_Sizes(mFontFace, 0, newSize);
mCurrentSize = newSize;
}
}