get_font_range_end(3)
β¨ get_font_range_end β¨
okay bestie, so this is a page straight out of the Allegro manual (the game programming library, not the musical tempo, iykyk π), and it's section 3 of the manual β so yes, it's a library function, we're in C land, bring your #includes π
π¦ NAME π¦
get_font_range_end β returns the last character of a character range in a font. Allegro game programming library, periodt.
πΈ SYNOPSIS πΈ
#include <allegro.h>
int get_font_range_end(FONT *f, int range)
π DESCRIPTION π
so this function is literally your bestie for figuring out the index to the last character of a character range in a font. that's the whole vibe. π«Ά
here's the tea on the range parameter though, because it's doing a little double duty:
- pass
-1for therangeparameter if you wanna know the start of the whole font range π - or pass a number from
0to (but not including)get_font_ranges(f)to get the start of a specific character range in the font
and bestie, listen β you should check the start AND end of all font ranges to see if a specific character is actually available in the font. because the way that not all characters in the range returned by get_font_range_begin(f, -1) and get_font_range_end(f, -1) need to be available! π like, the range being there does NOT mean every single char inside it is showing up to the party. so do your vibe check, okay?
here's the example, copied exactly, no cap:
printf("The font has a character range of %d - %d\n",
get_font_range_begin(font, -1),
get_font_range_end(font, -1));
β RETURN VALUE β
returns the last character in the font range, or -1 if that information is not available π (she said "no data, sorry bestie").
π SEE ALSO π
fr fr, go read the sibling functions too, they're all in the same friend group π
k bye bestie, this was Allegro version 4.4.3 energy and the whole page is giving iconic manual-core. slay, stay safe, and always check your ranges πβ¨π
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms