[comp.sys.atari.st] GDOS font format

RY04@DKAUNI11.BITNET (03/20/89)

in article <0317891715.KSR|CLJ@HARVARD.HARVARD.EDU>                     00000100
has been asked for the format of GDOS fonts.                            00000200
                                                                        00000300
here it is:                                                             00000400
                                                                        00000500
typedef struct                                                          00000600
{                                                                       00000700
  int   font_id;             /* number of font, standard is :           00000800
                                01 - SYSTEM                             00000900
                                02 - SWISS                              00001000
                                14 - DUTCH                              00001100
                                15 - TYPEWRITER                */       00001200
  int   point;               /* size in point mesurement       */       00001300
  char  name[32];            /* name of font. In the first              00001400
                                16 chars there is written the           00001500
                                name itself, in the rest there          00001600
                                is written the typeface        */       00001700
  unsigned int first_ade;    /* first character in font        */       00001800
  unsigned int last_ade;     /* last character in font         */       00001900
  unsigned int top;          /* difference topline<->baseline  */       00002000
  unsigned int ascent;       /* difference ascent<->baseline   */       00002010
  unsigned int half;         /* difference halfline<->baseline */       00002020
  unsigned int descent;      /* difference descentl<->baseline */       00002030
  unsigned int bottom;       /* difference bottoml<->baseline  */       00002040
  unsigned int max_charwidth;/* max char width                 */       00002050
  unsigned int max_cellwidth;/* max cell width                 */       00002060
  unsigned int left_offset;  /* left offset for cursive        */       00002070
  unsigned int right_offset; /* right offset for cur           */       00002080
  unsigned int thicken;      /* factor for bold                */       00002090
  unsigned int ul_size;      /* thickness of underline         */       00002091
  unsigned int lighten;      /* mask for lightened style       */       00002092
  unsigned int skew;         /* mask for cursive style         */       00002093
  unsigned int flags;        /* Bit 0 : default system font             00002094
                                Bit 1 : use "horizontal offset          00002100
                                        table                           00002200
                                Bit 2 : Intel format (0) or Moto-       00002300
                                        rola format (1). GDOS           00002400
                                        fonts MUST be in Moto-          00002500
                                        rola !!                */       00002600
  unsigned int *hor_table;   /* pointer to "horizontal offset           00002700
                                table"; in a file the offset            00002800
                                to its beginning              */        00002900
  unsigned int *off_table;   /* pointer to "character offset            00003000
                                table"                        */        00003100
  unsigned int *dat_table;   /* pointer to font image         */        00003200
  unsigned int form_width;   /* width of font image           */        00003300
  unsigned int form_heigth;  /* height of font image          */        00003400
  FONT_HDR    *nextfont;     /* pointer to next fontheader              00003500
                                (in a font file not used)     */        00003600
  unsigned int font_seg;     /* so called "ATARI DATA FLAG" ??*/        00003700
} FONT_HDR;                                                             00003800
                                                                        00003900
I hope this will help you...                                            00004000
                                                                        00004100
                                  Valli                                 00004200
                                                                        00004300
                                                                        00004400
                                                                        00004500
                                                                        00004600

kbad@atari.UUCP (Ken Badertscher) (03/27/89)

The unsigned int font_seg variable which was (unfortunately) included in
some GDOS documentation does not belong there.  It is an internal
variable which is only used by GDOS.  Actual font headers on disk should
end after the "next_font" longword. 
 
  One other thing you should know about GDOS fonts... the font data is
NOT guaranteed to be contiguous with the end of the header.  Whether on
disk or in memory, pointers/offsets are provided in the font header. 
Use them!  (Except the memory ones... you really should leave the
manipulation of font data loaded in memory up to the VDI...)


-- 
 Ken Badertscher                 | #include <disclaimer>
 Atari R&D Software Engine       | GEMDOS LIVES! ...or is that Frodo?
 {portal,ames,imagen}!atari!kbad | I can never remember these things...