GEOS Font

From Just Solve the File Format Problem
Jump to: navigation, search
File Format
Name GEOS Font
Ontology

GEOS Font files are multiple point size bitmaps stored in GEOS VLIR files; the chain number (0-126) is the point size. GEOS limits a font to a point size of 48. This is probably due to memory limitations for storing the font. Nonexistent point sizes have VLIR chain addresses of $00,$FF.

The header in each font file contains Font ID and point size information for the fonts in the file. This includes the FONT ID at offset $80 (128) within the header block, the 32 byte point size table at $82 (130) ordered from smallest to largest (padded with 0's), and the 32 byte font sizes at $61 (97) ordered from smallest to largest (padded with 0's). This leaves room for 16 fonts per font file.

Font files are identified by a unique ID number which is stored in the file's info sector at offset 130. The info sector contains a word identifier for each point size in the font. These identifiers have the form: ID# * 8 + point size. In other words, bits 15-6 represent the font number while bits 0-5 hold the point size. These ID words are used by geoWrite and geoPaint.

                        0    BSW            13   Tilden
                        1    University     14   Evans
                        2    California     15   Durant
                        3    Roma           16   Telegraph
                        4    Dwinelle       17   Superb
                        5    Cory           18   Bowditch
                        6    Tolman         19   Ormond
                        7    Bubble         20   Elmwood
                        8    Fontknox       21   Hearst
                        9    Harmon         21   Brennens (BUG)
                        10   Mykonos        23   Channing
                        11   Boalt          24   Putnam
                        12   Stadium        25   LeConte

Each VLIR in a font file is organized as follows:

         OffSet    Description
         -------   -------------------------------------------------------
         $00       Number  of pixels minus 1 above the underline.  This is
                   the line of print.
         $01-$02   Number of bytes in the bit stream.
         $03       Point size, character height in pixels.
         $04-$05   Index  from  beginning of font to table of  bit  stream
                   indices. Usually $0008.
         $06-$07   Index from beginning of font to first bit stream.
         $08-???   Table  of words which are indices into the bit streams;
                   one  for  each character from space (32) to  the  tilde
                   (126).  There is also an extra index on the  end.  This
                   extra  index is needed because the difference between a
                   character's index and the next character's index is the
                   width of the character in pixels.
         ???-???   Pointed  to by $06-$07.  The font is stored as  several
                   bit  streams,  one for each line of pixels.  The  point
                   size  is the number of bit streams.  All the  character
                   images  are stored in the bit stream.  The GEOS  KERNAL
                   has  some very sophisticated bit manipulation  routines
                   for accessing any given character.

(content taken from http://zimmers.net/geos/docs/fontfile.txt which is unattributed and has been floating around BBS and web sites for decades)

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox