PS_STRINGWIDTH2(3)
π PS_STRINGWIDTH2 π
okay bestie, so this one lives in the Library Functions Manual, and its whole entire job? measuring strings. that's it. that's the vibe. β¨
πΈ NAME πΈ
PS_stringwidth2 β gets the width of a string, no cap π«Ά
π SYNOPSIS π
#include <pslib.h>
float PS_stringwidth2(PSDoc *psdoc, const char *text, int len, int
fontid, float size)
π¦ DESCRIPTION π¦
so like, this function calculates the width of a string in points, assuming it got output in the font you specify and at the font size you specify. it's giving "how much horizontal space is this text gonna eat up" energy π
it will not consider more than len characters. so if your string is a whole novel and you only want the first len of it measured, that's literally what len is for, bestie.
here's the tea though π: this function needs an Adobe font metrics file to calculate the precise width. no metrics file, no precision. that's just how it is, periodt.
and oh β if kerning is turned on, it will be taken into account. kerning girlies, this one's for you πβ¨
π RETURN VALUE π
the width of a string, in points. that's the whole gift. π
π SEE ALSO π
iykyk, go read those next π
π§ AUTHOR π§
this manual page was written by Uwe Steinmann uwe@steinmann.cx. absolute icon behavior, we love to see it π
and that's the whole page, bestie!! this was PS_STRINGWIDTH2(3) from the Library Functions Manual β go forth and measure your strings responsibly, mwah πβ¨π¦
π¦ 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