PS_SHOW2(3)

✨ PS_SHOW2 ✨

okay bestie, gather round, because we're talking about PS_show2 β€” a lil library function from the Library Functions Manual that is genuinely the moment when your text actually hits the page. πŸ’–


πŸŽ€ NAME πŸŽ€

PS_show2 β€” output text with a given length. yes, that's the whole job. she's focused. she's iconic. πŸ’…


🌸 SYNOPSIS 🌸

#include <pslib.h>

void PS_show2(PSDoc *psdoc, char *text, int xlen)

like, that's it. that's the whole signature. look at her. πŸ¦‹


πŸ’œ DESCRIPTION πŸ’œ

so here's the tea: PS_show2() drops some text right at the current text position. but β€” and this is the key part, no cap β€” it will show no more than xlen chars. that's the whole difference between her and her sister PS_show(3). she's the "i have a character budget and i'm sticking to it" girlie. 🎯

⚠️ and listen: if you haven't set a font yet with PS_setfont(3), she WILL throw an error at you. she is not flexible about this. set the font first, bestie, fr fr. 😭

PS_show2() also reads a whole lil stack of parameters and values that you set up beforehand with PS_set_parameter(3) and PS_set_value(3). so like, she's not doing this alone β€” she's got a whole entourage. πŸ‘‘

  • textx β€” the x coordinate for where the text goes. horizontal placement, periodt.
  • texty β€” the y coordinate for where the text goes. vertical vibes.
  • charspacing (value) β€” the distance between two consecutive glyphs. and here's the plot twist: if this value is not equal to zero, then all the ligatures get resolved. also, values less than zero are totally allowed. she's not judging. πŸ’€
  • kerning (parameter) β€” set this to false and kerning turns off. it's on by default, so if you do nothing, kerning is thriving. ✨
  • ligatures (parameter) β€” set this to false and ligatures get turned off. also on by default. so default behavior is ligature girl summer. 🌈
  • underline (parameter) β€” set this to true and boom, underlining is on. off by default, so she's not underlining unless you ask. πŸŽ€
  • overline (parameter) β€” set this to true and you get overlining. off by default. the line goes over. revolutionary, i know. ⭐
  • strikeout (parameter) β€” set this to true and she strikes the text out. off by default. very "crossing out my ex's name" energy. πŸ’…

🫢 SEE ALSO 🫢

go read those too, they're all in the same friend group. iykyk. 🌸


πŸ‘‘ AUTHOR πŸ‘‘

this manual page was written by Uwe Steinmann β€” uwe@steinmann.cx. absolute legend, we love her work. πŸ’–


and that's the whole page, bestie!! πŸ¦‹ this lil icon lives in the Library Functions Manual and she answers to the name PS_SHOW2(3) β€” that's the title up top and the footer down below, same vibe, same girl, no cap. go forth and print exactly xlen characters. slay. πŸ’…βœ¨

πŸ“¦ where this page comes from