add layout designer
This commit is contained in:
@@ -21,6 +21,9 @@ bool Font::load(const std::string& ttf, int font_size, float font_scale)
|
||||
LOG("Font::load loaded");
|
||||
auto bitmap = std::make_unique<uint8_t[]>(w*h);
|
||||
chars.resize(num_chars);
|
||||
//int offset = stbtt_FindMatchingFont(file.m_data, "Arial Bold", STBTT_MACSTYLE_DONTCARE);
|
||||
//if (offset < 0)
|
||||
// offset = 0;
|
||||
stbtt_BakeFontBitmap(file.m_data, 0, (float)font_size*scale, bitmap.get(), w, h, start_char, num_chars, chars.data());
|
||||
calc_bounds();
|
||||
font_tex.create(w, h, GL_R8, GL_RED, bitmap.get());
|
||||
|
||||
Reference in New Issue
Block a user