get_font_ranges(3alleg)

get_font_ranges3alleg

Returns the number of character ranges in a font. allegro game programming library.

Usage

#include <allegro.h>

int get_font_ranges(FONT *f)

Overview

Use this function to find out the number of character ranges in a font. You should query each of these ranges with get_font_range_begin() and get_font_range_end() to find out what characters are available in the font. Example:

   FONT *f;
   int range;
   int n;
   ...
   range = get_font_ranges(f);
   printf("The font has %d character ranges:\n", range);
   for (n = 0; n < range; n++)
      printf("Range %d from 0x%03x - 0x%03x\n",
             get_font_range_begin(f, n),
             get_font_range_end(f, n));

Return value

Returns the number of continuous character ranges in a font, or -1 if that information is not available.

Releases

3 releases since Debian 4.0 (Etch); the text changed 1 time.

  1. 4.0
  2. 5.0–6.0

From liballegro-doc 2:4.2.2-2.2 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.