Article # 60, added by Geoworks, historical record
| first | previous | index | next | last |

Fonts, Nimbus Font Converter, GEOS font format




There may be more documentation on the font format in the 
SDK, but here is some information. 
 
 char 4 dup "BSWF" 
 byte 0 ;minor version # 
 byte 1 ;major version # 
 word # ;size of header 
 word FontIDs ;unique 16-bit ID 
 word 0x1000 ;which font rasterizer to use (0x1000 == GEOS) 
 byte  FontFamily -- 
  bit 7: must be 0 
  bit 6: 1 if fixed width, 0 if proportional 
  bit 5: 1 if landscape, 0 if portrait (bitmap fonts only) 
  bit 4: 1 if outline font, 0 if bitmap only 
  bits 0-3: 
  - 0 - serif (eg. URW Roman) 
  - 1 - sans serif (eg. URW Sans) 
  - 2 - script (eg. Shattuck Avenue) 
  - 3 - ornamental (eg. Cooperstown) 
  - 4 - symbol (eg. URW SymbolPS) 
  - 5 - mono-spaced (eg. Courier) 
 byte char 20 dup(?) 
 
The name must be NULL-terminated (and therefore can be up to 
19 characters). 
 
If you have trouble getting the italic or bold versions of 
fonts to convert as part of the same file as the plain 
versions, here is some information which might help. Finding 
out if this is appropriate will require looking at the 
Nimbus font files with a disk editor of some sort, so it is 
not for the weak-hearted.

The Nimbus Font Converter looks at several fields in the 
header of the Nimbus file(s) to get this: 
 
(1) offset 84: full name of font 
 
This should be the name of the font, plus any styles. For 
example, the original Nimbus file for the bold-italic 
version of URW Sans has "URW Sans Bold Italic" for this 
field. If there are several files that contain different 
styles of the same font, the 'basename' in the 'fullname' 
should be the same. For example, for "URW Sans", the 4 files 
would contain "URW Sans", "URW Sans Italic", "URW Sans 
Bold", and "URW Sans Bold Italic". If the 'basename' does 
not match, then the fonts will not be placed together. If 
the 'fullname' for any of the fonts is missing any part of 
the style, then the Nimbus Font Converter won't be able to 
distinguish which is which style. 
 
(2) offset 304: weight 
 
This should be the weight of the font, such as "Bold", 
"Extra Bold", or "Heavy". This should be set correctly so 
that for some fonts, the different weights of "Bold" can be 
distinguished. For example, many fonts may come with a 
"Normal" weight, and a "Bold" weight. However, some fonts 
may come with a "Heavy" weight instead of the "Bold". If 
this field is not set correctly, then the Nimbus Font 
Converter may have problems similar to distinguishing 
separate styles, as mentioned above. 
 
Some fonts that are compatible with the Nimbus Font 
Converter are included in ZSoft's "SoftType" program. It 
includes 60 or so Nimbus-Q font files, some of which are 
various styles of a particular font (eg. Bold, Italic, and 
Bold-Italic), and some of which are the same fonts that are 
already included with GEOS software (eg. URW Sans). There 
may be other sources of Nimbus-Q fonts, but this is one that 
we know of (because we used it for some testing of the 
Nimbus Font Converter.)