aboutsummaryrefslogtreecommitdiff
path: root/teensy
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-05-14 15:31:42 -0400
committeriamcheeseman <[email protected]>2026-05-14 15:31:42 -0400
commit7828f700d0e9205cf3ac3eb7f07db29b99c1408e (patch)
tree7b5dba54c3d5d8ca5f9ec8996fdb2f1705b635f0 /teensy
parent46de6d936395b1063a729b9e40cfca290033482b (diff)
`ty_font_width()` takes in a const font ptr
Diffstat (limited to 'teensy')
-rw-r--r--teensy/teensy.h2
-rw-r--r--teensy/teensy_renderer.c2
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);