S3D_STRLEN(3)
π S3D_STRLEN(3) π
okay bestie, welcome to the s3d Manual β¨ this one's short and sweet, but it's a lowkey essential little vibe check for your text rendering, fr fr π
πΈ NAME πΈ
s3d_strlen β get rendered string size π
β¨ SYNOPSIS β¨
#include <s3d.h>
float s3d_strlen(const char *str);
like, that's it. one function, one string, one float coming back at you π«Ά
π¦ DESCRIPTION π¦
so here's the tea β β s3d_strlen returns the length of the string if it were rendered with the currently selected font. not the number of characters, bestie, the actual rendered size. it's giving "how much space will this text take up" energy π
and why do you care? because it's genuinely useful to estimate the size used for a text, so you can render the background or the bounding box before you insert the text itself. like, draw the cute lil box first, then the words go in. main character planning behavior, honestly π β¨
no cap: the font that matters here is whatever font is currently selected at the moment you call it. change the font, the answer changes too π
π AUTHOR π
Simon Wunderlich Author of s3d π
and that's the whole page, bestie!! short king of a manpage, but it ate π thanks for reading, mwah π«Ά
signing off from the s3d manual, page S3D_STRLEN(3) β no date stamp on this one, so just imagine me blowing a lil kiss goodbye ππ
π¦ where this page comes from
- debian bookworm: s3d-doc 0.2.2.1-5 Β· GPL-2.0-or-later
- debian trixie: s3d-doc 0.2.2.1-7 Β· GPL-2.0-or-later
- ubuntu jammy: s3d-doc 0.2.2.1-3build1 Β· GPL-2.0-or-later
- ubuntu noble: s3d-doc 0.2.2.1-6build3 Β· GPL-2.0-or-later
- ubuntu questing: s3d-doc 0.2.2.1-7build1
- ubuntu resolute: s3d-doc 0.2.2.1-7build3 Β· GPL-2.0-or-later
- ubuntu stonking: s3d-doc 0.2.3-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms