summaryrefslogtreecommitdiff
path: root/text.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-07-31 23:51:02 -0400
committerpommicket <pommicket@gmail.com>2023-08-01 12:54:24 -0400
commit7c5ca21fdd5fb3448376e9491528487ddb5db076 (patch)
tree4ff33aa87182f48a0e001bf1532799191b518d53 /text.h
parentf8b5606c42ba3ae35baf823c12865cc7aa68d260 (diff)
fix inconsistencies btwn xoff_to_index & rendering
Diffstat (limited to 'text.h')
-rw-r--r--text.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/text.h b/text.h
index 8b2f133..3fd603c 100644
--- a/text.h
+++ b/text.h
@@ -44,6 +44,12 @@ typedef struct {
/// index of previous glyph rendered, or 0 if this is the first
int prev_glyph;
+ /// added to x for rendering
+ /// this exists for complicated reasons
+ /// basically we want a way of consistently getting the size
+ /// of text without error from floating point imprecision
+ float x_render_offset;
+
/// used for forwards-compatibility
char _reserved[64];
} TextRenderState;