envos READAPPLEFONT 2 4 1 READAPPLEFONT 1 4 By: Christopher Lane (Lane@Sumex-Aim.Stanford.Edu) Uses: READDISPLAYFONT READAPPLEFONT defines a new display font type which allows Envos Lisp to use (commercially available) Macintosh display fonts. Although this module is primarily intended for extracting font width information for conversion programs (eg. MacPaint to Sketch and vice versa) it can also be used to extend the number of display fonts available within the Envos Lisp environment. There are no user functions in the module. In addition to this module, you need a directory of extracted Macintosh font files (as described below) and you must add the name of that directory to the system DISPLAYFONTDIRECTORIES list. The following function is added under the type APPLE to the list DISPLAYFONTTYPES (defined by the READDISPLAYFONT module). (READAPPLEFONT STREAM FAMILY SIZE FACE) [Function] The module also adds the extension APPLE to the system list DISPLAYFONTEXTENSIONS. FONT FILES This module only uses the FontRec portion of the font files (see Inside Macintosh). The font resources must be extracted into individual files with appropriate names, eg. SANFRANCISCO18-MRR-C0.APPLE. One method of doing this is to use the Font/DA Mover utility: @50|`@ ``O `x``x`````O ``@ `x00 xx<  0| @ f  xx@ f<8 8x0ffd ̙32d0ffp38p0f~8 ?80f` 00@ fbL ̙1&L0@ |<8 8x000 @  @@  @ `<!@<00x" 8F"@b 0pAg$@a`<|f>1Ç0ff`(@0`fff #33&L0Hff` >@``fff33 0xff`"@0`fff 331 0Aff`0"@a`fff330 0Aff``"@bfff 0332fL0Afc~#@<<|>31Ç0x @` @`F?< ""@ (""@( `""@ 8(g""@ff`&(ff`F""@ff`(ff`""@ff`(fc""@(""@(""@( ""@ ( `<""@ 8f(gf""@ff`f(ff`<""@񙙙ff`f(ff`f""@ff`f(fc<""@(""@( ""@ (""@( `<""@ F(g""@ff`&(ff` F""@ff`(ff`0""@ff``(fc~""@(""@(?o?~ϓLJ?=ώfl͛3? ßf|ǟ3Ϟff|3?Ϟff|3?Ϟfflٛ3? ϟgLJ`0"@Æ``0(`|fx""@`ff1(af`ff100""@af`ff1003(af`ff1p3>03""@af`ff10333303(|>333303""@s33330(F333330""@<333330(3>0""@0(0""@( `""@ `(xq?Lf` @ f`00  @`003#@ `3>0 3"@L&`A33330 3"@xpcA33330 3"@As33330 3>@333330 3(@H333330 3$@3>0 "@A0!@"0 @ @@ @0 @ 0@ 3``3x<|8 3p321Ffd̙3 3y381>f`3 >_`31ff`3 3N`31ff`Ø3 3D`3&1ffdə3 3@ff>f8 @ff#  |8Ì`fdfLf`<|f f`fpffgf`f8ffcf`fffaf`f ff`̀f`fLffd`|8<`8 338`0 33<`0 336`0 #33#3a0 1`0xx? ` `  0 ` 10 `& 01 <8x 033&` `fd 033` `fp 031 `f8 030 `f 132f  `&fL 10<8x    ` `?    ?  'рy0D̀fy` njf?0ff?~p If another method for extracting the FontRec data structure into individual files is used, the following variable will probably need to be reset: APPLEFONTREC.OFFSET [Variable] The offset in bytes into the font file of where the FontRec data structure begins (initially 264). NOTES f This module only handles proportionally spaced fonts and ignores fractional character widths. f The user is responsible for determining the legality of extracting the fonts in question. The individual font files should be moved to a Unix AUFS/CAP server (or the equivalent) and the resource forks (in the .resource directory) should be copied to the directory you added to DISPLAYFONTDIRECTORIES above. (LIST ((PAGE NIL (PAPERSIZE LETTER FOLIOINFO (ARABIC "" "") STARTINGPAGE# 228) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))))),58P2  5,,8,8H PAGEHEADING RUNNINGHEAD CLASSICCLASSICCLASSICMODERN ?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8))  HELVETICA MODERN MODERN MODERN MODERNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN   HRULE.GETFNMODERN  4z  \  # * A  A: BMOBJ.GETFN3?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8)) ca]HIz