PS_symbol_width(3)

✨ PS_symbol_width(3) ✨

okay bestie, so this one is PS_symbol_width, and it lives in the Library Functions Manual β€” section 3, the "yes these are library functions" section πŸ’…. Her whole entire job? Telling you how wide a glyph is. That's it. That's the girl. πŸŽ€


🌸 NAME 🌸

PS_symbol_width β€” get the width of a glyph πŸ¦‹


🌈 SYNOPSIS 🌈

#include <pslib.h>

float PS_symbol_width(PSDoc *psdoc, unsigned char c, int fontid, float size)

πŸ’– DESCRIPTION πŸ’–

So basically, this function goes and retrieves the width of a glyph β€” and that glyph is sitting at position c in the font encoding vector. πŸ‘‘

Now, the font encoding for a font? You can set that when you're loading the font with PS_findfont(). iykyk. ✨

And here's the cute part: fontid and size are optional, bestie. You can literally just set them to zero 🫢 and in such a case the current font and current size will be used. no cap. lowkey iconic behaviour honestly.


⭐ RETURN VALUE ⭐

The width of the symbol in points. that's the whole vibe. πŸ“βœ¨


πŸ¦‹ SEE ALSO πŸ¦‹

go read those too, they're a whole friend group πŸ’œ


πŸ’œ AUTHOR πŸ’œ

This manual page was written by Uwe Steinmann uwe@steinmann.cx. πŸ’Œ giving main character energy fr fr.


and that's the tea, bestie πŸ“ β€” this was PS_symbol_width(3) from the Library Functions Manual, and yeah, the footer is literally just her name again: PS_symbol_width(3). slay. πŸ’…πŸŒΈβœ¨

πŸ“¦ where this page comes from