From f537f5c9bbe07fae2577f5a8c0058bd7b9b38ef9 Mon Sep 17 00:00:00 2001
From: captain0xff <[EMAIL REDACTED]>
Date: Fri, 24 Jan 2025 21:45:59 +0530
Subject: [PATCH] added a note regarding rebuilding of the text data in the
docs
---
include/SDL3_ttf/SDL_ttf.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/include/SDL3_ttf/SDL_ttf.h b/include/SDL3_ttf/SDL_ttf.h
index 823c60ed..244e64e3 100644
--- a/include/SDL3_ttf/SDL_ttf.h
+++ b/include/SDL3_ttf/SDL_ttf.h
@@ -1810,6 +1810,8 @@ extern SDL_DECLSPEC SDL_PropertiesID SDLCALL TTF_GetTextProperties(TTF_Text *tex
/**
* Set the text engine used by a text object.
+ *
+ * This function may cause the internal text representation to be rebuilt.
*
* \param text the TTF_Text to modify.
* \param engine the text engine to use for drawing.
@@ -1847,6 +1849,8 @@ extern SDL_DECLSPEC TTF_TextEngine * SDLCALL TTF_GetTextEngine(TTF_Text *text);
* When a text object has a font, any changes to the font will automatically
* regenerate the text. If you set the font to NULL, the text will continue to
* render but changes to the font will no longer affect the text.
+ *
+ * This function may cause the internal text representation to be rebuilt.
*
* \param text the TTF_Text to modify.
* \param font the font to use, may be NULL.
@@ -1979,6 +1983,8 @@ extern SDL_DECLSPEC bool SDLCALL TTF_GetTextColorFloat(TTF_Text *text, float *r,
*
* This can be used to position multiple text objects within a single wrapping
* text area.
+ *
+ * This function may cause the internal text representation to be rebuilt.
*
* \param text the TTF_Text to modify.
* \param x the x offset of the upper left corner of this text in pixels.
@@ -2013,6 +2019,8 @@ extern SDL_DECLSPEC bool SDLCALL TTF_GetTextPosition(TTF_Text *text, int *x, int
/**
* Set whether wrapping is enabled on a text object.
+ *
+ * This function may cause the internal text representation to be rebuilt.
*
* \param text the TTF_Text to modify.
* \param wrap_width the maximum width in pixels, 0 to wrap on newline
@@ -2054,6 +2062,8 @@ extern SDL_DECLSPEC bool SDLCALL TTF_GetTextWrapWidth(TTF_Text *text, int *wrap_
* alignment and wrapping. This is good for editing, but looks better when
* centered or aligned if whitespace around line wrapping is hidden. This
* defaults false.
+ *
+ * This function may cause the internal text representation to be rebuilt.
*
* \param text the TTF_Text to modify.
* \param visible true to show whitespace when wrapping text, false to hide
@@ -2088,6 +2098,8 @@ extern SDL_DECLSPEC bool SDLCALL TTF_TextWrapWhitespaceVisible(TTF_Text *text);
/**
* Set the UTF-8 text used by a text object.
+ *
+ * This function may cause the internal text representation to be rebuilt.
*
* \param text the TTF_Text to modify.
* \param string the UTF-8 text to use, may be NULL.
@@ -2109,6 +2121,8 @@ extern SDL_DECLSPEC bool SDLCALL TTF_SetTextString(TTF_Text *text, const char *s
/**
* Insert UTF-8 text into a text object.
+ *
+ * This function may cause the internal text representation to be rebuilt.
*
* \param text the TTF_Text to modify.
* \param offset the offset, in bytes, from the beginning of the string if >=
@@ -2134,6 +2148,8 @@ extern SDL_DECLSPEC bool SDLCALL TTF_InsertTextString(TTF_Text *text, int offset
/**
* Append UTF-8 text to a text object.
+ *
+ * This function may cause the internal text representation to be rebuilt.
*
* \param text the TTF_Text to modify.
* \param string the UTF-8 text to insert.
@@ -2155,6 +2171,8 @@ extern SDL_DECLSPEC bool SDLCALL TTF_AppendTextString(TTF_Text *text, const char
/**
* Delete UTF-8 text from a text object.
+ *
+ * This function may cause the internal text representation to be rebuilt.
*
* \param text the TTF_Text to modify.
* \param offset the offset, in bytes, from the beginning of the string if >=