summaryrefslogtreecommitdiff
path: root/vendor/text.h
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/text.h')
-rw-r--r--vendor/text.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/vendor/text.h b/vendor/text.h
index bf4f363..9cd445a 100644
--- a/vendor/text.h
+++ b/vendor/text.h
@@ -6,5 +6,9 @@
eight-pixel ASCII advance and a 16-pixel line box); fallback uses Fontconfig. */
bool sk_text_draw(SDL_Renderer *, float x, float y, float scale,
const char *utf8, size_t len, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
+/* What sk_text_draw gives the text at `scale`: its advance width and the
+ height of its line box, in logical units. False if it cannot be laid out. */
+bool sk_text_measure(SDL_Renderer *, float scale, const char *utf8, size_t len,
+ float *width, float *height);
void sk_text_begin_frame(SDL_Renderer *);
#endif