Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!UIAMVS.BITNET!AWCTTYPA From: AWCTTYPA@UIAMVS.BITNET ("David A. Lyons") Newsgroups: comp.sys.apple Subject: how to find a IIgs font in memory Message-ID: <8804050214.aa00793@SMOKE.BRL.ARPA> Date: 5 Apr 88 19:58:09 GMT Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 78 X-Unparsable-Date: Monday 04 Apr 88 11:52 PM CT >Date: Mon, 4 Apr 88 22:47:03 GMT >From: Donald J Aehl >Subject: APPLE IIGS SYSTEM FONT >Comments: To: info-apple@BRL.ARPA >I have been unable to locate the System Font's location within memory. >I have checked various RAM & ROM maps for the Apple IIgs, but I have been >unable to locate it. You won't find it in a ROM map for the IIgs because Apple doesn't guarantee that it will be anyplace in particular--and it won't (it will move with ROM revisions). You're attacking the problem from the hard end--see below. >I even used the search routines in Banks $E0 and $E1 >and $FE and $FF to find the word "shaston" yet nothing turned up. The FONT is in ROM, but the *name* isn't. (The Font Manager [not currently in ROM] knows the name, though.) >I am assuming that the system font resides in ROM (either banks $FE or $FF). That is currently correct (as of ROM 01 [same as "ROM 2.0"]). >Can anyone out there give me directions to the system font? You bet. Turn on your machine and get into BASIC; then type CALL-151 to get into the monitor ("*" prompt). Type "#" to install a "Visit Monitor" desk accessory that is hidden in your ROM. [Note--this assumes you have ROM 01 (the "new" ROM). If you don't, I leave it up to you how to get into the monitor later after QuickDraw is started up.] Now boot up some program that starts QuickDraw II. Either the Finder or the Launcher on System Disk 3.1 (but NOT the "Desktop" on System disk 1.1) will do nicely. Type Apple-Ctrl-ESC to get to the CDA menu, and choose "visit monitor." Now you are in the monitor WITH QUICKDRAW TURNED ON. Now we will do a "GetFont" call to QuickDraw, as documented in Volume II of the Toolbox Reference. This will give us a handle to the current font, which will be Shaston 8 (the system font). Here's how to do it: \4 4 0 0 0 0 95 4\U (This means: push 4 bytes on the stack before the tool call, and pull 4 bytes from the stack after the tool call. The four bytes are all 0, and the tool we're calling is $95 in toolset 4 (QuickDraw). The "\" are required around all that stuff, and the "U" means "Utility" call (for no really good reason--T was already used).) You will see 4 bytes printed on the screen. Something like E0 77 FE 00 This means that $00FE77E0 is a "handle" to the font. In other words, it's a pointer to a pointer to the font. So you type FE/77E0.77E3 and see something like FE/77E0:E6 77 FE 00 meaning that $00FE77E6 is a pointer to (in other words, "the address of") the font. So at $FE77E6 I found the system font in my machine. So what do you do with it? Well, you probably won't be able to get much use out of it unless you have Volume II of the Toolbox Reference. The QuickDraw II chapter explains the format of a font, and it's pretty weird. >ARPA: aehl@csd4.milw.wisc.edu USMAIL: Donald Aehl > Box #204 > 3400 N. Maryland Ave. > Milwaukee, WI 53201 >UUCP: ihnp4!uwmcsd1!uwm-evax!aehl ICBM: 43 4 58 N / 87 55 52 W --David A. Lyons a.k.a. DAL Systems PO Box 287 | North Liberty, IA 52317 BITNET: AWCTTYPA@UIAMVS CompuServe: 72177,3233 GEnie mail: D.LYONS2