AL_LOAD_TTF_FONT_STRETCH(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

✨ al_load_ttf_font_stretch(3) ✨

ok so bestie, this one lives in the Library Functions Manual and it's literally the glow-up version of loading a font πŸ’…


🌸 NAME 🌸

al_load_ttf_font_stretch β€” the Allegro 5 API girlie who loads your TTF fonts and lets you stretch them πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro5/allegro_ttf.h>

ALLEGRO_FONT *al_load_ttf_font_stretch(char const *filename, int w, int h,
   int flags)

πŸ’– DESCRIPTION πŸ’–

okay so picture al_load_ttf_font(3)… but make it give you more 🫢 It's exactly like that function, except instead of one single size parameter it takes separate w and h parameters. Two of them. Iconic, honestly.

Here's the vibe check on how the numbers work πŸ‘‘

  • if h (the height) is a positive value, and w (the width) is zero or positive, then the font gets stretched according to those parameters. slay πŸŽ€
  • the width must not be negative if the height is positive. fr fr, that's a hard no πŸ™ˆ
  • and same energy as al_load_ttf_font(3): the height may be a negative value, which means "specify the total height in pixels" β€” and in that case the width must also be negative, or zero. no mixing and matching πŸ’€
and if you get it wrong? it returns NULL 😭 specifically: if the height is positive while the width is negative, or if the height is negative while the width is positive. Those combos are not the moment, bestie.

⭐ SINCE ⭐

5.0.6, 5.1.0 β€” she's been around a minute πŸ‘‘


🌈 SEE ALSO 🌈


and that's the whole page, no cap πŸ’œ this was the Allegro reference manual dropping al_load_ttf_font_stretch(3) knowledge β€” go stretch something cute 🧚

πŸ“¦ where this page comes from
  • arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms