Changeset 1357 for libcaca/trunk/cucul/font.c
- Timestamp:
- Nov 12, 2006, 11:42:14 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/cucul/font.c
r1303 r1357 489 489 } 490 490 491 /*492 * The libcaca font format, version 1493 * ----------------------------------494 *495 * All types are big endian.496 *497 * struct498 * {499 * magic:500 * uint8_t caca_header[2]; // "\xCA\xCA"501 * uint8_t caca_file_type[2]; // "FT"502 *503 * font_header:504 * uint32_t control_size; // Control size (font_data - font_header)505 * uint32_t data_size; // Data size (EOF - font_data)506 *507 * uint16_t version; // Font format version508 * // bit 0: set to 1 if font is compatible509 * // with version 1 of the format510 * // bits 1-15: unused yet, must be 0511 *512 * uint16_t blocks; // Number of blocks in the font513 * uint32_t glyphs; // Total number of glyphs in the font514 *515 * uint16_t bpp; // Bits per pixel for glyph data (valid516 * // Values are 1, 2, 4 and 8)517 * uint16_t width; // Maximum glyph width518 * uint16_t height; // Maximum glyph height519 *520 * uint16_t flags; // Feature flags521 * // bit 0: set to 1 if font is fixed width522 * // bits 1-15: unused yet, must be 0523 *524 * block_info:525 * struct526 * {527 * uint32_t start; // Unicode index of the first glyph528 * uint32_t stop; // Unicode index of the last glyph + 1529 * uint32_t index; // Glyph info index of the first glyph530 * }531 * block_list[blocks];532 *533 * glyph_info:534 * struct535 * {536 * uint16_t width; // Glyph width in pixels537 * uint16_t height; // Glyph height in pixels538 * uint32_t data_offset; // Offset (starting from data) to the data539 * // for the first character540 * }541 * glyph_list[glyphs];542 *543 * control_extension_1:544 * control_extension_2:545 * ...546 * control_extension_N:547 * ... // reserved for future use548 *549 * font_data:550 * uint8_t data[data_size]; // glyph data551 *552 * data_extension_1:553 * data_extension_2:554 * ...555 * data_extension_N:556 * ... // reserved for future use557 * };558 */559
Note: See TracChangeset
for help on using the changeset viewer.