S3D_SELECT_FONT(3)

πŸ’– S3D_SELECT_FONT β€” it's giving font selection, bestie πŸ’–

okay so this is page 3 of the s3d manual (yes, section 3, we love a library call), and today's main character is s3d_select_font. let's get into it ✨


🌸 NAME 🌸

s3d_select_font β€” select font πŸŽ€

like. that's the whole job. it picks a font. slay.


✨ SYNOPSIS ✨

#include <s3d.h>

int s3d_select_font(const char *mask);

so you pull in <s3d.h>, and then you've got this lil function that takes a const char *mask and hands you back an int. cute. efficient. we stan 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

bestie listen. this function selects a font for the s3d_draw_string() function. that's it. that's the vibe. you give it a mask, and whichever font face matches becomes the one that s3d_draw_string() is gonna use. no cap. πŸ’…

⚠️ Warning ⚠️ Of course, you won't forget to toggle it visible, won't you? 😭

like. the font is selected. the font is not automatically visible. that part is on you, bestie. do not come crying to me when your gorgeous little text doesn't show up because you skipped the visible toggle. i'm just the messenger πŸ’€

and here's the example, exactly as it lives:

s3d_select_font("vera"); // will use the vera font face

so "vera" gets you the vera font face. iconic. that's the demo. periodt.


πŸ‘‘ AUTHOR πŸ‘‘

Simon Wunderlich β€” Author of s3d 🌈

absolute legend, we love them, thank you for the library fr fr πŸ’œ


🌟 the sign-off 🌟

this whole thing comes to you from the s3d manual, and the footer is just... s3d β€” no date, no version number, nothing extra, and honestly? mysterious. enigmatic. main character energy. iykyk 😌

go forth and draw your little strings, and remember the visibility toggle. mwah πŸ’‹πŸŽ€