Ignore:
Timestamp:
Nov 12, 2006, 11:42:14 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • Documentation updates. Moved the canvas and font format definitions to the Doxygen documentation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cucul/font.c

    r1303 r1357  
    489489}
    490490
    491 /*
    492  * The libcaca font format, version 1
    493  * ----------------------------------
    494  *
    495  * All types are big endian.
    496  *
    497  * struct
    498  * {
    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 version
    508  *                               //  bit 0: set to 1 if font is compatible
    509  *                               //         with version 1 of the format
    510  *                               //  bits 1-15: unused yet, must be 0
    511  *
    512  *    uint16_t blocks;           // Number of blocks in the font
    513  *    uint32_t glyphs;           // Total number of glyphs in the font
    514  *
    515  *    uint16_t bpp;              // Bits per pixel for glyph data (valid
    516  *                               // Values are 1, 2, 4 and 8)
    517  *    uint16_t width;            // Maximum glyph width
    518  *    uint16_t height;           // Maximum glyph height
    519  *
    520  *    uint16_t flags;            // Feature flags
    521  *                               //  bit 0: set to 1 if font is fixed width
    522  *                               //  bits 1-15: unused yet, must be 0
    523  *
    524  * block_info:
    525  *    struct
    526  *    {
    527  *       uint32_t start;         // Unicode index of the first glyph
    528  *       uint32_t stop;          // Unicode index of the last glyph + 1
    529  *       uint32_t index;         // Glyph info index of the first glyph
    530  *    }
    531  *    block_list[blocks];
    532  *
    533  * glyph_info:
    534  *    struct
    535  *    {
    536  *       uint16_t width;         // Glyph width in pixels
    537  *       uint16_t height;        // Glyph height in pixels
    538  *       uint32_t data_offset;   // Offset (starting from data) to the data
    539  *                               // for the first character
    540  *    }
    541  *    glyph_list[glyphs];
    542  *
    543  * control_extension_1:
    544  * control_extension_2:
    545  *    ...
    546  * control_extension_N:
    547  *    ...                        // reserved for future use
    548  *
    549  * font_data:
    550  *    uint8_t data[data_size];   // glyph data
    551  *
    552  * data_extension_1:
    553  * data_extension_2:
    554  *    ...
    555  * data_extension_N:
    556  *    ...                        // reserved for future use
    557  * };
    558  */
    559 
Note: See TracChangeset for help on using the changeset viewer.