Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 
 

72 řádky
2.0 KiB

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