1extract_font_range(3)           Allegro manual           extract_font_range(3)
2
3
4

NAME

6       extract_font_range  - Extracts a range of characters from a font. Alle‐
7       gro game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       FONT *extract_font_range(FONT *f, int begin, int end)
14

DESCRIPTION

16       This function extracts a character range from a font and returns a  new
17       font  that contains only the range of characters selected by this func‐
18       tion. You can pass -1 for either the lower or upper bound if  you  want
19       to  select  all  characters  from  the start or to the end of the font.
20       Example:
21
22          FONT *myfont;
23          FONT *capitals;
24          FONT *fontcopy;
25          ...
26          /* Create a font of only capital letters */
27          capitals = extract_font_range(myfont, 'A', 'Z');
28
29          /* Create a copy of the font */
30          fontcopy = extract_font_range(myfont, -1, -1);
31          ...
32          destroy_font(capitals);
33          destroy_font(fontcopy);
34

RETURN VALUE

36       Returns a pointer to the new font or NULL on error. Remember  that  you
37       are  responsible  for destroying the font when you are finished with it
38       to avoid memory leaks.
39
40

SEE ALSO

42       get_font_range_begin(3), get_font_range_end(3), merge_fonts(3),  trans‐
43       pose_font(3), exfont(3)
44
45
46
47Allegro                          version 4.2.3           extract_font_range(3)
Impressum