get_font_range_end(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

✨ 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 -1 for the range parameter if you wanna know the start of the whole font range πŸ‘‘
  • or pass a number from 0 to (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