Subject: Re: Font conversion
From: [email-masked] (Corey Murtagh)
Date: 10 Dec 91 08:22:20 GMT
Newsgroups: comp.sys.apple2

Umm.  I thonk there's a little more involved in importing a font from 
the Mac to the GS.  According to the Toolbox Refernce 2 each of the 
GS fonts has a header that looks something like this:

offsetToMF  - integer: number of words to mac font part
family      - integer: font family number
style       - integer: style font was designed with
size        - integer: font point size
version     - integer: version number of font
fbrExtent   - integer: font bounds rectangle extent
highhowTLoc - word: high order word of address to offset/width table
............ - bytes: extra fields, if any

The last of the named fields is from the Toolbox Reference 3.
  The next part, as far as I can tell, is the Macintosh font record. 
 Its format is:

fontType    - word: font type.  Ignored on the GS
firstChar   - WORD: ascii code of the first character defined
lastChar    - WORD: ascii code of the last character defined
widMax      - WORD: maximum character width
kernMax     - WORD: maximum leftward kern
nDescent    - WORD: negative of descent
fRectWidth  - WORD: width of font rectangle
fRectHeight - WORD: height of font rectangle 
owTLoc      - WORD: low word of pointer to offset/width table
ascent      - WORD: font ascent
descent     - WORD: font descent
leading     - WORD: leading
rowWords    - WORD: width of font strike in words
bitimage    - array (1..rowWords,1..fRectHeight) of words
                     called the font strike
loctable    - array (firstChar..lastChar+2) of integer
                     locationth table
owTable     - array (firstChar..lastChar+2)  of integers
                     offset/width table

  Hope this info helps.  Shouldn't be too hard to throw together a little 
program to shove a header onto a Mac font.  Just be careful that you 
ascent      - WORD: font ascent
descent     - WORD: font descent
leading     - WORD: leading
rowWords    - WORD: width of font strike in words
bitimage    - array (1..rowWords,1..fRectHeight) of words
                     called the font strike
loctable    - array (firstChar..lastChar+2) of integer
                     locationth table
owTable     - array (firstChar..lastChar+2)  of integers
                     offset/width table

  Hope this info helps.  Shouldn't be too hard to throw together a little 
program to shove a header onto a Mac font.  Just be careful that you 
ascent      - WORD: font ascent
descent     - WORD: font descent
leading     - WORD: leading
rowWords    - WORD: width of font strike in words
bitimage    - array (1..rowWords,1..fRectHeight) of words
                     called the font strike
loctable    - array (firstChar..lastChar+2) of integer
                     locationth table
owTable     - array (firstChar..lastChar+2)  of integers
                     offset/width table

  Hope this info helps.  Shouldn't be too hard to throw together a little 
program to shove a header onto a Mac font.  Just be careful that you 
ascent      - WORD: font ascent
descent     - WORD: font descent
leading     - WORD: leading
rowWords    - WORD: width of font strike in words
bitimage    - array (1..rowWords,1..fRectHeight) of words
                     called the font strike
loctable    - array (firstChar..lastChar+2) of integer
                     locationth table
owTable     - array (firstChar..lastChar+2)  of integers
                     offset/width table

  Hope this info helps.  Shouldn't be too hard to throw together a little 
program to shove a header onto a Mac font.  Just be careful that you 
don't use an existing font number.  Also, the version field in the GS 
font header should be set to the current (IE: system 5.04) QuickDrawII 
version number, to ensure that QuickDraw recognises the extra field.

+----------------------------+--------------------------------------------+
| Corey Murtagh              | "Ye who doubt, believe, for the Apple      |
| [email-masked] |  II lives on!" - ME                        |   
+----------------------------+--------------------------------------------+

don't use an existing font number.  Also, the version field in the GS 
font header should be set to the current (IE: system 5.04) QuickDrawII 
version number, to ensure that QuickDraw recognises the extra field.

+----------------------------+--------------------------------------------+
| Corey Murtagh              | "Ye who doubt, believe, for the Apple      |
| [email-masked] |  II lives on!" - ME                        |   
+----------------------------+--------------------------------------------+