From cf7cfd96a62b26321de970496670005cf411c94c Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 15 Sep 2026 17:36:32 -0300 Subject: Center GUI pane indicators using cached font ink bounds --- src/gui/font.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gui/font.h') diff --git a/src/gui/font.h b/src/gui/font.h index 2aff8b1a..d965b418 100644 --- a/src/gui/font.h +++ b/src/gui/font.h @@ -38,6 +38,10 @@ int ui_font_raster(UIFont *f, float px, int32_t cp, uint8_t *out, int32_t stride, int32_t cell_w, int32_t cell_h, int32_t ascent); +// Center bitmap ink bounds, independent of advance and baseline bearings. +int ui_font_raster_centered(UIFont *f, float px, int32_t cp, uint8_t *out, + int32_t stride, int32_t width, int32_t height); + void ui_font_free(UIFont *f); #ifdef __cplusplus -- cgit v1.3