summaryrefslogtreecommitdiff
path: root/text.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-09 10:15:42 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-09 10:15:42 -0500
commit7be42dc83ff694da2f1e66a59a14fe51d3e18fba (patch)
treeb4da6d79dcfd52c11a1220860670ff3ac0477e01 /text.c
parentf9afc00d15f934d8509f3eeb7c62b01ca84ca204 (diff)
case sensitivity, regex
Diffstat (limited to 'text.c')
-rw-r--r--text.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/text.c b/text.c
index 074dde6..aeb17ea 100644
--- a/text.c
+++ b/text.c
@@ -374,6 +374,13 @@ void text_get_size(Font *font, char const *text, float *width, float *height) {
if (height) *height = y + font->char_height;
}
+v2 text_get_size_v2(Font *font, char const *text) {
+ v2 v;
+ text_get_size(font, text, &v.x, &v.y);
+ return v;
+}
+
+
void text_get_size32(Font *font, char32_t const *text, u64 len, float *width, float *height) {
TextRenderState render_state = text_render_state_default;
render_state.render = false;