Add modals!

This commit is contained in:
2026-03-03 01:13:04 -05:00
parent b469b8212f
commit 7902db6ec7
4 changed files with 442 additions and 3 deletions

View File

@@ -874,9 +874,9 @@ static void emit_text_glyphs(DrawBatch *batch, Renderer *r,
F32 scale = (F32)font_size / r->font_atlas_size;
F32 text_h = r->font_line_height * scale;
// Vertically center text in bounding box
F32 x = bbox.x;
F32 y = bbox.y + (bbox.height - text_h) * 0.5f;
// Vertically center text in bounding box, snapped to pixel grid to avoid blurry glyphs
F32 x = floorf(bbox.x + 0.5f);
F32 y = floorf(bbox.y + (bbox.height - text_h) * 0.5f + 0.5f);
for (int32_t i = 0; i < text_len; i++) {
char ch = text[i];