al_draw_justified_text(3)

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

al_draw_justified_text(3) β€” Library Functions Manual πŸ’…

🌸 NAME 🌸

al_draw_justified_text β€” Allegro 5 API ✨

okay bestie, this is the Allegro 5 API page for al_draw_justified_text(3) β€” justified-text edition. It’s giving β€œtext but make the spacing cute,” fr fr. 🫢

✨ SYNOPSIS ✨

here’s the signature, keep it exact because code does not want you freestyling, no cap: πŸŽ€

              #include <allegro5/allegro_font.h>

              void al_draw_justified_text(const ALLEGRO_FONT *font,
                 ALLEGRO_COLOR color, float x1, float x2,
                 float y, float diff, int flags, const char *text)

πŸ¦‹ DESCRIPTION πŸ¦‹

So al_draw_justified_text is literally like al_draw_text(3), but it justifies the string to the region x1-x2. The region is the moment; the text is the main character. πŸ’…

The diff parameter is the maximum amount of horizontal space to allow between words. If justifying the text would exceed diff pixels, or the string contains less than two words, then the string will be drawn left aligned. That’s the vibe check, bestie β€” too much stretch or not enough words = left aligned, periodt. 😌

The flags parameter can be 0 or one of the following flags:

  • ALLEGRO_ALIGN_INTEGER β€” Draw text aligned to integer pixel positions. Since: 5.0.8, 5.1.5

πŸ’œ SEE ALSO πŸ’œ

go peek at these too, bestie, they’re right there in the manual:


mwah πŸ’‹ source: Allegro reference manual; version/date: not listed on this page β€” no cap, we’re not inventing one. this has been al_draw_justified_text(3), signing off with max horizontal vibes. byeeee πŸŽ€βœ¨

πŸ“¦ 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