Commit: 1be2e60791c0b00cecfaaf917ce81e5fad3011e3
Parent: 06f92343a2176078d1cc750fa8904cf8f6287a0e
Author: Randy Palamar
Date: Thu, 27 Jun 2024 23:32:47 -0600
update font metrics in init_fonts
Technically this is now run an extra time but it is needed to
avoid a frame of input lag/needing to update them on every fb
resize
Diffstat:
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/font.c b/font.c
@@ -88,4 +88,5 @@ init_fonts(Term *t, char **paths, u32 npaths, u32 fontsize, Arena *a)
t->gl.glyph_cache_len = 0x7E - 0x20 + 1;
t->gl.glyph_cache = alloc(a, Glyph, t->gl.glyph_cache_len);
+ update_font_metrics(t);
}
diff --git a/main.c b/main.c
@@ -296,9 +296,9 @@ main(void)
term.gl.dt = current_time - last_time;
last_time = current_time;
+ glfwPollEvents();
do_terminal(&term, memory);
glfwSwapBuffers(term.gl.window);
- glfwPollEvents();
}
return 0;