get_font_range_begin(3alleg4)

✨ get_font_range_begin ✨

okay bestie, welcome to the Allegro manual πŸ’– this one's from the 3alleg4 section, so grab your font pointers and let's go πŸŽ€


🌸 NAME 🌸

get_font_range_begin β€” returns the start of a character range in a font. it's giving Allegro game programming library energy πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro.h>

int get_font_range_begin(FONT *f, int range)

πŸ’… DESCRIPTION πŸ’…

so this function is your little detective πŸ” it lets you find out the start of a specific character range for a font. iconic behavior, honestly.

here's the tea on the range parameter β˜•:

  • you can pass -1 if you want to know the start of the whole font range (like, the entire vibe)
  • or you can 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 here's an example so you can see it in the wild 🧚:

printf("The font has a character range of %d - %d\n",
       get_font_range_begin(font, -1),
       get_font_range_end(font, -1));

not me writing printf statements at 3am 😭 slay though, it works.


🌈 RETURN VALUE 🌈

returns the first character in the font range 🫢 ... or -1 if that information is not available. so like, if it comes back -1, the info just isn't there, no cap. πŸ’€


⭐ SEE ALSO ⭐


friendly reminder bestie: everything above is facts only, i'm just the messenger with better nails πŸ’…

and that's a wrap on this page, written for Allegro version 4.4.3 πŸŽ€ go forth and range-check your fonts, you absolute main character πŸ‘‘βœ¨