您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

72 行
2.1 KiB

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