[comp.sys.mac] fonts: I was half wrong. Now what do I do?

allbery@NCoast.ORG (Brandon S. Allbery) (01/08/90)

A few days ago, I posted a question about replacing Apple fonts with versions
which can be associated with PostScript fonts; in particular, I mentioned
Geneva.  Well, I found a Helvetica 9 bitmap on Sumex and proceeded to place
Helvetica bitmaps in a suitcase and use ResEdit to diddle them into being
"Geneva" -- yes, I got everything; I've done such trickery before, as I
mentioned previously.  I then rebooted off a floppy and used ResEdit to
replace the stock Geneva fonts with my modified copies.

IT DIDN'T WORK.  The system rebooted -- and Finder continued to use the
*original* Geneva, which is no longer in my System file.

So:  is Geneva 9 in the ROMs, like Chicago 12?  If so, what resource(s) do I
need to add or patch to force the System file copies to be used?  Or will ATM
get it right even if Finder uses a "bootleg" (from *my* standpoint, at least)
copy of Geneva 9?  (Well, that last I can test, at least.)  Or is something
else unusual going on, say Finder having its own private copy of Geneva 9
(again, testable here) or etc.?

[Earnestly hoping I don't get too badly roasted by Apple on this attempt to
fool their software....]

Thanks in advance,
++Brandon
-- 
Brandon S. Allbery    allbery@NCoast.ORG, BALLBERY (MCI Mail), ALLBERY (Delphi)
      uunet!cwjcc.cwru.edu!ncoast!allbery ncoast!allbery@cwjcc.cwru.edu
*(comp.sources.misc mail to comp-sources-misc[-request]@backbone.site, please)*
*Third party vote-collection service: send mail to allbery@uunet.uu.net (ONLY)*

briand@tekig5.PEN.TEK.COM (Brian Diehm) (01/11/90)

>A few days ago, I posted a question about replacing Apple fonts with versions
>which can be associated with PostScript fonts; in particular, I mentioned
>Geneva.  Well, I found a Helvetica 9 bitmap on Sumex and proceeded to place
>Helvetica bitmaps in a suitcase and use ResEdit to diddle them into being
>"Geneva" -- yes, I got everything; I've done such trickery before, as I
>mentioned previously.  I then rebooted off a floppy and used ResEdit to
>replace the stock Geneva fonts with my modified copies.
>
>IT DIDN'T WORK.  The system rebooted -- and Finder continued to use the
>*original* Geneva, which is no longer in my System file.
>So:  is Geneva 9 in the ROMs, like Chicago 12?

Yes.

>If so, what resource(s) do I need to add or patch to force the System file
>copies to be used?

You need to add an entry to the appropriate ROV# resource to tell the system
to take the named resource from the system instead of ROM. There are three
ROV# resources: 117 for the MacPlus, 376 for the SE, and 630 for the Mac II.
You can patch just the one you need or all three if you anticipate moving your
system to another, different, machine.

A ROV# entry consists of a resource name and number. You need to add one entry
to each ROV#, listing the resource type (FONT) and the resource number (for
Geneva 9, 393).

--------------------

Another trap you need to look out for is the FOND widths. The original Geneva,
being a bitmap-only font, had no fractional width tables and no kerning tables
in the associated FOND. The Helvetica FOND has all these things, and so you
should also kludge up the FOND resource as well. Good Luck. The FOND resource
is also the place where the pointer resides to the appropriate PostScript and
PostScript style variants; the file names and postscript names are found near
the end of the FOND. This is another reason to kludge the FOND rather than try-
ing to build one from scratch.

Also, you will probably want to use the Adobe screen fonts, not the ones 
supplied by Apple. Apple uses different vertical line spacing on-screen, and the
Adobe ones are more accurate. This is a general statement for all the LW and
LW+ fonts. Also, only Adobe provides bit-map fonts for the style variations.

Finally, if you are winding up with a FONT resource instead of an NFNT resource
(which you have to do to maintaint the Geneva family number 3), then realize
that when you are all done, you should have a dummy, zero-length FONT resource
of the name Geneva and the zero-point-size resource number (384). This dummy
is accessible by ResEdit IF you open the FONT window with "Open General" in-
stead of double-clicking the FONT line in the file window. If you omit this,
once in a while the Font/DA Mover will screw up over the omission. (Question
for Apple - why should the Font/DA Mover care? Get rid of this requirement!)

Opening-General the FONT window reveals that 1) the font entries are not REALLY
sorted by name and point size, 2) the font resources are not all named (e.g.
"Geneva 9"), 3) a few ARE named. The ones that are named are the dummy FONT
resources; early Mac systems required these to know what fonts to include in
Font menus before there were FOND resources. These dummy fonts, one per family,
are zero-length resources, are named with the family name, and are numbered as
the zero-point-size versions of the font (128 * family number). The others are
the real fonts, have no names, and have unique numbers ( (128 * family number)
+ point size ).

NFNT families do not need, nor can they have, dummy FONT resources.

-- 
-Brian Diehm
Tektronix, Inc.                (503) 627-3437         briand@tekig5.PEN.TEK.COM
P.O. Box 500, M/S 39-383
Beaverton, OR   97077                        (SDA - Standard Disclaimers Apply)