Branch: Tag:

1997-05-28

1997-05-28 19:41:39 by Mirar (Pontus Hagland) <pike@sort.mirar.org>

just inserted font spec

Rev: src/modules/Image/doc.txt:1.2(DEAD)
Rev: src/modules/Image/doc/image_old_doc.html:1.2(DEAD)
Rev: src/modules/Image/font.c:1.12
Rev: src/modules/Image/togif.c:1.12

39:   **! see also: Image, Image.image   */    - /* $Id: font.c,v 1.11 1997/05/25 09:35:36 grubba Exp $ */ + /* Dump a font into a Roxen Font file (format version 2)    -  +  On-disk syntax (everything in N.B.O), int is 4 bytes, a byte is 8 bits: +  + pos +  0 int cookie = 'FONT'; or 0x464f4e54 +  4 int version = 2; 1 was the old version without the last four chars +  8 int numchars; Always 256 in this version of the dump program + 12 int height; in (whole) pixels + 16 int baseline; in (whole) pixels + 20 char direction; 1==right to left, 0 is left to right + 21 char format; Font format + 22 char colortablep; Colortable format + 23 char kerningtablep; Kerning table format +  + 24 int offsets[numchars]; pointers into the data, realative to &cookie. +  [colortable] +  [kerningtable] +  +  At each offset: +  +  + 0 int width; in pixels + 4 int spacing; in 1/1000:th of a pixels + 8 char data[]; Enough data to plot width * font->height pixels +  Please note that if width is 0, there is no data. +  + Font formats: +  id type efficiency with lucida 128 +  0 Raw 8bit data not really.. :-) +  1 RLE encoded data, char length, char data, 70% more compact than raw data +  2 ZLib compressed RLE encoded data 60% more compact than RLE +  + Colortable types: +  0 No colortable +  1 24bit RGB (index->color, 256*3 bytes) +  2 24bit Greyscale (index->color, 256*3 bytes) +  + Kerningtable types: +  0 No kerning table +  1 numchars*numchars entries, each a signed char with the kerning value +  2 numchar entries, each with a list of kerning pairs, like this: +  int len +  len * (short char, short value) +  */ +  +  +  +    #include "global.h"      #include <sys/types.h>