diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-15 17:36:32 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-09-15 17:43:13 -0300 |
| commit | cf7cfd96a62b26321de970496670005cf411c94c (patch) | |
| tree | fd3da24fb47b5d88cf2135874900a35397f7e1f9 /src/gui/font.h | |
| parent | e462d566f710e714e3b7176672e98fc82a6dea62 (diff) | |
| download | pardes-cf7cfd96a62b26321de970496670005cf411c94c.tar.gz pardes-cf7cfd96a62b26321de970496670005cf411c94c.zip | |
Center GUI pane indicators using cached font ink bounds
Diffstat (limited to 'src/gui/font.h')
| -rw-r--r-- | src/gui/font.h | 4 |
1 files changed, 4 insertions, 0 deletions
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 |
