1libcaca-font(3caca)                 libcaca                libcaca-font(3caca)
2
3
4

NAME

6       libcaca-font - The libcaca font format (version 1)
7
8       All types are big endian.
9
10       struct
11       {
12       magic:
13          uint8_t caca_header[2];    // "\xCA\xCA"
14          uint8_t caca_file_type[2]; // "FT"
15
16       font_header:
17          uint32_t control_size;     // Control size (font_data - font_header)
18          uint32_t data_size;        // Data size (EOF - font_data)
19
20          uint16_t version;          // Font format version
21                                     //  bit 0: set to 1 if font is compatible
22                                     //         with version 1 of the format
23                                     //  bits 1-15: unused yet, must be 0
24
25          uint16_t blocks;           // Number of blocks in the font
26          uint32_t glyphs;           // Total number of glyphs in the font
27
28          uint16_t bpp;              // Bits per pixel for glyph data (valid
29                                     // Values are 1, 2, 4 and 8)
30          uint16_t width;            // Standard glyph width
31          uint16_t height;           // Standard glyph height
32          uint16_t maxwidth;         // Maximum glyph width
33          uint16_t maxheight;        // Maximum glyph height
34
35          uint16_t flags;            // Feature flags
36                                     //  bit 0: set to 1 if font is fixed width
37                                     //  bits 1-15: unused yet, must be 0
38
39       block_info:
40          struct
41          {
42             uint32_t start;         // Unicode index of the first glyph
43             uint32_t stop;          // Unicode index of the last glyph + 1
44             uint32_t index;         // Glyph info index of the first glyph
45          }
46          block_list[blocks];
47
48       glyph_info:
49          struct
50          {
51             uint16_t width;         // Glyph width in pixels
52             uint16_t height;        // Glyph height in pixels
53             uint32_t data_offset;   // Offset (starting from data) to the data
54                                     // for the first character
55          }
56          glyph_list[glyphs];
57
58       control_extension_1:
59       control_extension_2:
60          ...
61       control_extension_N:
62          ...                        // reserved for future use
63
64       font_data:
65          uint8_t data[data_size];   // glyph data
66
67       data_extension_1:
68       data_extension_2:
69          ...
70       data_extension_N:
71          ...                        // reserved for future use
72       };
73
74Version 0.99.beta20             Sun Sep 24 2023            libcaca-font(3caca)
Impressum