al_draw_justified_text(3)
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