---
name: "get_font_range_end"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/get_font_range_end/3alleg4"
---

# get\_font\_range\_end(3alleg4)

Returns the last character of a character range in a font. Allegro game programming library.

## NAME

get\_font\_range\_end - Returns the last character of a character range in a font. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**int get\_font\_range\_end(FONT \*f, int range)**

## DESCRIPTION

This function allows you to find out the index to the last character of a character range for a font. You can pass -1 for the range parameter if you want to know the start of the whole font range, or a number from 0 to (but not including) get\_font\_ranges(f) to get the start of a specific character range in the font. You should check the start and end of all font ranges to see if a specific character is actually available in the font. 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! Example:

```
   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.

## SEE ALSO

**get\_font\_ranges**(3alleg4), **get\_font\_range\_begin**(3alleg4), **transpose\_font**(3alleg4)
