summaryrefslogtreecommitdiff
path: root/text.h
diff options
context:
space:
mode:
Diffstat (limited to 'text.h')
-rw-r--r--text.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/text.h b/text.h
index 820bbd1..ad2a3b0 100644
--- a/text.h
+++ b/text.h
@@ -11,6 +11,9 @@
typedef struct Font Font;
typedef struct {
+ // should the text actually be rendered (set to false to get text size)
+ bool render;
+
float x, y;
// points at which the text should be cut off
float min_x, max_x, min_y, max_y;
@@ -32,6 +35,7 @@ extern float text_font_char_width(Font *font);
extern void text_render(Font *font, char const *text, float x, float y);
// Get the dimensions of some text.
extern void text_get_size(Font *font, char const *text, float *width, float *height);
+extern void text_get_size32(Font *font, char32_t const *text, u64 len, float *width, float *height);
// Write text, but using a state, starting at (x, y) -- state->x and state->y are ignored. This allows you to control min/max_x/y.
extern void text_render_with_state(Font *font, TextRenderState *state, char const *text, float x, float y);
// Begin writing characters.