1load_txt_font(3) Allegro manual load_txt_font(3)
2
3
4
6 load_txt_font - Loads a font script. Allegro game programming library.
7
9 #include <allegro.h>
10
11
12 FONT *load_txt_font(const char *filename, RGB *pal, void *param)
13
15 This function can be used to load scripted fonts. The script file con‐
16 tains a number of lines in the format "filename start end", which spec‐
17 ify the source file for that range of characters, the Unicode value of
18 the first character in the range, and the end character in the range
19 (optional, if left out, the entire input file will be grabbed). If the
20 filename is replaced by a hyphen, more characters will be grabbed from
21 the previous input file. For example, the script:
22
23 ascii.fnt 0x20 0x7F
24 - 0xA0 0xFF
25 dingbats.fnt 0x1000
26
27 would import the first 96 characters from ascii.fnt as the range
28 0x20-0x7F, the next 96 characters from ascii.fnt as the range
29 0xA0-0xFF, and the entire contents of dingbats.fnt starting at Unicode
30 position 0x1000.
31
33 Returns a pointer to the font or NULL on error. Remember that you are
34 responsible for destroying the font when you are finished with it to
35 avoid memory leaks.
36
37
38
39
41 register_font_file_type(3), load_font(3)
42
43
44
45Allegro version 4.4.3 load_txt_font(3)