No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

font.dox 2.1 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* $Id$ */
  2. /** \page libcaca-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; // Standard glyph width
  22. uint16_t height; // Standard glyph height
  23. uint16_t maxwidth; // Maximum glyph width
  24. uint16_t maxheight; // Maximum glyph height
  25. uint16_t flags; // Feature flags
  26. // bit 0: set to 1 if font is fixed width
  27. // bits 1-15: unused yet, must be 0
  28. block_info:
  29. struct
  30. {
  31. uint32_t start; // Unicode index of the first glyph
  32. uint32_t stop; // Unicode index of the last glyph + 1
  33. uint32_t index; // Glyph info index of the first glyph
  34. }
  35. block_list[blocks];
  36. glyph_info:
  37. struct
  38. {
  39. uint16_t width; // Glyph width in pixels
  40. uint16_t height; // Glyph height in pixels
  41. uint32_t data_offset; // Offset (starting from data) to the data
  42. // for the first character
  43. }
  44. glyph_list[glyphs];
  45. control_extension_1:
  46. control_extension_2:
  47. ...
  48. control_extension_N:
  49. ... // reserved for future use
  50. font_data:
  51. uint8_t data[data_size]; // glyph data
  52. data_extension_1:
  53. data_extension_2:
  54. ...
  55. data_extension_N:
  56. ... // reserved for future use
  57. };
  58. \endcode
  59. */