TTF_SubString(3type)
TTF_SubString π β¨ (SDL_ttf3 DATATYPES, bestie)
okay so real talk: this page is TTF_SubString(3type), living in the SDL_ttf3 DATATYPES part of the manual, and it's literally just the glow-up explanation of one struct. it's giving "i know exactly where a lil piece of your text is" and honestly? obsessed. π«Ά
β¨ NAME β¨
TTF_SubString β the representation of a substring within text.
π HEADER FILE π
it's defined in SDL3_ttf/SDL_ttf.h. yes bestie, that exact path, no cap. π¦
π SYNOPSIS π
#include "SDL3_ttf/SDL_ttf.h"
typedef struct TTF_SubString
{
TTF_SubStringFlags flags; /**< The flags for this substring */
int offset; /**< The byte offset from the beginning of the text */
int length; /**< The byte length starting at the offset */
int line_index; /**< The index of the line that contains this substring */
int cluster_index; /**< The internal cluster index, used for quickly iterating */
SDL_Rect rect; /**< The rectangle, relative to the top left of the text, containing the substring */
} TTF_SubString;
and here's the vibe check on every single field, because you deserve to know:
flags(typeTTF_SubStringFlags) β the flags for this substring. π©offset(typeint) β the byte offset from the beginning of the text.length(typeint) β the byte length starting at the offset.line_index(typeint) β the index of the line that contains this substring.cluster_index(typeint) β the internal cluster index, used for quickly iterating. lowkey the speedrun field. π₯rect(typeSDL_Rect) β the rectangle, relative to the top left of the text, containing the substring.
πΈ AVAILABILITY πΈ
this struct is available since SDL_ttf 3.0.0. periodt. π
π SEE ALSO π
the besties this struct runs with:
β’(3), TTF_GetNextTextSubString(3), β’(3),
TTF_GetPreviousTextSubString(3), β’(3), TTF_GetTextSubString(3), β’(3),
TTF_GetTextSubStringForLine(3), β’(3), TTF_GetTextSubStringForPoint(3),
β’(3), TTF_GetTextSubStringsForRange(3)
and that's the whole page, bestie π this was TTF_SubString(3type), brought to you by SDL_ttf 3.2.2 β go forth and substring responsibly, ily ππ¦β¨
π¦ where this page comes from
- debian trixie: libsdl3-ttf-doc 3.2.2+ds-1 Β· Zlib
- fedora 43: SDL3_ttf-devel 3.2.2-2.fc43 Β· Zlib AND MIT
- fedora 43: SDL3_ttf-devel 3.2.2-2.fc43 Β· Zlib AND MIT
- fedora 44: SDL3_ttf-devel 3.2.2-4.fc44 Β· Zlib AND MIT
- fedora 44: SDL3_ttf-devel 3.2.2-4.fc44 Β· Zlib AND MIT
- ubuntu questing: libsdl3-ttf-doc 3.2.2+ds-1
- ubuntu resolute: libsdl3-ttf-doc 3.2.2+ds-1build1 Β· Zlib
- ubuntu stonking: libsdl3-ttf-doc 3.2.2+ds-2 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms