1register_font_file_type(3) Allegro manual register_font_file_type(3)
2
3
4
6 register_font_file_type - Register a new font loading function. Allegro
7 game programming library.
8
10 #include <allegro.h>
11
12
13 void register_font_file_type(const char *ext, FONT *(*load)(const char
14 *filename, RGB *pal, void *param));
15
17 Informs the load_font() functions of a new file type, providing a rou‐
18 tine to read fonts in this format. The function you supply must follow
19 the following prototype:
20
21 FONT *load_my_font(const char *filename, RGB *pal, void *param)
22 {
23 ...
24 }
25
26 The pal parameter can optionally be used to return a palette for the
27 FONT. The parameter param can be anything you like: you can use this
28 to pass information to your loading routine, such as for instance the
29 font height, the character range to load or the index number of a font
30 in a datafile. If you choose to write your own font loading code, your
31 function should be prepared to deal with a value of NULL for either of
32 these parameters.
33
34
36 load_font(3)
37
38
39
40Allegro version 4.4.3 register_font_file_type(3)