This commit is contained in:
2024-10-28 20:17:39 +01:00
parent fed7111362
commit d167538b3f
9 changed files with 73 additions and 73 deletions

View File

@@ -19,13 +19,14 @@ namespace mlx
float stb_x = 0.0f;
float stb_y = 0.0f;
auto char_data = font->GetCharData();
for(char c : text)
{
if(c < 32)
continue;
stbtt_aligned_quad q;
stbtt_GetPackedQuad(font->GetCharData().data(), RANGE, RANGE, c - 32, &stb_x, &stb_y, &q, 1);
stbtt_GetPackedQuad(char_data.data(), RANGE, RANGE, c - 32, &stb_x, &stb_y, &q, 1);
std::size_t index = vertex_data.size();