PS_STRINGWIDTH3(3)
π PS_STRINGWIDTH3 β Library Functions Manual π
okay bestie, this is the manual page for PS_STRINGWIDTH3(3) and honestly? she's a little niche but she serves. pslib string geometry, no cap. let's get into it π¦
β¨ NAME β¨
PS_string_geometry β Gets geometry of a string π
πΈ SYNOPSIS πΈ
#include <pslib.h>
float PS_string_geometry(PSDoc *psdoc, const char *text, int len, int
fontid, float size, float *dimension)
like, that's the whole thing. six args. she's committed. π
π« DESCRIPTION π«
so here's the tea: this function is identical to PS_stringwidth2(3), fr fr, literally the same vibe β except she has one extra parameter, dimension, and if that baby is not NULL, it gets used to hand back even more dimensions of the string. extra intel. bonus content. the director's cut. π
here's what comes back in the array, bestie, write it down:
dimension[0]contains the width as returned by the function πdimension[1]contains the maximum descender πdimension[2]contains the maximum ascender π
so yeah, three slots of geometry. width, how far down she goes, how far up she goes. iconic.
lowkey important: ifdimensionisNULL, none of that array stuff happens. so don't go dereferencing aNULLpointer, that's giving π not it.
π«Ά RETURN VALUE π«Ά
Width of a string in points. that's the number she gives you back. periodt. β¨
π SEE ALSO π
go read those too, they're the prequels bestie, iykyk π
π AUTHOR π
This manual page was written by Uwe Steinmann uwe@steinmann.cx. give credit where credit is due, always. π
and that's a wrap on PS_STRINGWIDTH3(3) from the Library Functions Manual β mwah, no notes, go measure some strings and slay π
π
π¦ where this page comes from
- debian bookworm: pslib-dev 0.4.7-1+b1
- debian trixie: pslib-dev 0.4.8-1+b1
- ubuntu jammy: pslib-dev 0.4.7-1
- ubuntu noble: pslib-dev 0.4.7-1build2
- ubuntu questing: pslib-dev 0.4.8-1
- ubuntu resolute: pslib-dev 0.4.8-1build1
- ubuntu stonking: pslib-dev 0.4.8-3 Β· GPL-2.0-or-later OR LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms