All types are big endian.
struct
{
magic:
uint8_t caca_header[2];
uint8_t caca_file_type[2];
font_header:
uint32_t control_size;
uint32_t data_size;
uint16_t version;
uint16_t blocks;
uint32_t glyphs;
uint16_t bpp;
uint16_t width;
uint16_t height;
uint16_t maxwidth;
uint16_t maxheight;
uint16_t flags;
block_info:
struct
{
uint32_t start;
uint32_t stop;
uint32_t index;
}
block_list[blocks];
glyph_info:
struct
{
uint16_t width;
uint16_t height;
uint32_t data_offset;
}
glyph_list[glyphs];
control_extension_1:
control_extension_2:
...
control_extension_N:
...
font_data:
uint8_t data[data_size];
data_extension_1:
data_extension_2:
...
data_extension_N:
...
};