Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

61 rinda
1.7 KiB

  1. /*
  2. * libcucul Canvas for ultrafast compositing of Unicode letters
  3. * Copyright (c) 2002-2006 Sam Hocevar <sam@zoy.org>
  4. * All Rights Reserved
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the Do What The Fuck You Want To
  8. * Public License, Version 2, as published by Sam Hocevar. See
  9. * http://sam.zoy.org/wtfpl/COPYING for more details.
  10. */
  11. /** \file font.c
  12. * \version \$Id$
  13. * \author Sam Hocevar <sam@zoy.org>
  14. * \brief Colour handling
  15. *
  16. * This file contains font handling functions.
  17. */
  18. /*
  19. * The libcaca font format
  20. * -----------------------
  21. *
  22. * All types are big endian.
  23. *
  24. * struct
  25. * {
  26. * uint8_t caca_header[4]; // "CACA"
  27. * uint8_t caca_file_type[4]; // "FONT"
  28. *
  29. * header:
  30. * uint32_t header_size; // size of the header (data - header)
  31. * uint16_t version; // font format version (= 1)
  32. *
  33. * uint16_t glyphs; // total number of glyphs in the font
  34. * uint16_t width; // glyph width
  35. * uint16_t height; // glyph height
  36. * uint16_t bytes; // bytes used to code each character,
  37. * // rounded up to a multiple of 2.
  38. *
  39. * uint16_t blocks; // number of blocks in the font
  40. *
  41. * struct
  42. * {
  43. * uint32_t start; // Unicode index of the first character
  44. * uint32_t end; // Unicode index of the last character + 1
  45. * uint32_t offset; // Offset (starting from data) to the data
  46. * // for the first character
  47. * }
  48. * block_list[blocks];
  49. *
  50. * padding:
  51. * ... // reserved for future use
  52. *
  53. * data:
  54. * uint4_t[glyphs * bytes]; // glyph data
  55. * };
  56. *
  57. */