summaryrefslogtreecommitdiff
path: root/text.h
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-01-18 10:25:03 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-01-18 10:25:03 -0500
commit6db2ef3ce69c17f6291b30fcb9278e7d4df53c71 (patch)
tree38ff8b7f9bd46d93e51d4044de8601fbdd85bea0 /text.h
parent859619b443b8d67fb262b3338015b036a1f942e1 (diff)
fix text.c/h
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.