From 7828f700d0e9205cf3ac3eb7f07db29b99c1408e Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Thu, 14 May 2026 15:31:42 -0400 Subject: `ty_font_width()` takes in a const font ptr --- teensy/teensy.h | 2 +- teensy/teensy_renderer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/teensy/teensy.h b/teensy/teensy.h index 0e36a6e..2e172c1 100644 --- a/teensy/teensy.h +++ b/teensy/teensy.h @@ -136,7 +136,7 @@ void ty_img_set_pixel( ); void ty_font_add_glyph(ty_Font *font, uint8_t c, ty_Image img); -int ty_font_width(ty_Font *font, const char *fmt, ...); +int ty_font_width(const ty_Font *font, const char *fmt, ...); // Pass NULL to restore the screen. void ty_draw_set_target(const ty_Image *img); diff --git a/teensy/teensy_renderer.c b/teensy/teensy_renderer.c index 1e24248..61710a2 100644 --- a/teensy/teensy_renderer.c +++ b/teensy/teensy_renderer.c @@ -103,7 +103,7 @@ void ty_font_add_glyph(ty_Font *font, uint8_t c, ty_Image img) font->glyphs[c] = img; } -int ty_font_width(ty_Font *font, const char *fmt, ...) +int ty_font_width(const ty_Font *font, const char *fmt, ...) { va_list args; va_start(args, fmt); -- cgit v1.3-2-g0d8e