Making Newton OS Fonts There are two ways that TrueType fonts for the Newton OS can be made using tools available from Apple. One is to use the Newton Font Tool. This is available for download from the Newton developer site. The Newton Font Tool is the simplest way to make a font for the Newton. Unfortunately, it has a number of disadvantages: 1. It is not a supported Apple font tool. No further bugs will be fixed in the Newton Font Tool. 2. It only works on fonts which already have standard Mac OS bitmaps ('NFNT' resources). 3. It only works on fonts which use the standard MacRoman character repertoire. In particular, it uses the pre-Mac OS 8.5 MacRoman character repertoire, which provides support for the Universal Currency Symbol but not the Euro Symbol. Alternatively, there are a number of free tools provided by Apple intended for use on TrueType fonts for the Mac OS. It is possible to create Newton fonts using these tools. The main disadvantages are: 1. It's necessary to use more than one tool. 2. The tools are not currently intended for the creation of fonts for the Newton OS. This means that some hand-tweaking will be necessary. Future releases of these tools will provide more direct support for Newton OS fonts. This document describes how to use these Mac OS font tools to make fonts for the Newton. It is strongly recommended that people who use these techniques familiarize themselves with TrueType fonts using Apple's on-line TrueType font documentation and the Newton font specification. The Newton and Unicode The Newton provides, in theory, full support for the Unicode character set. (For more information, you can visit The Unicode Consortium's Web site or look over the Unicode code charts.) In practice, without the ability to reliable input Unicode characters outside of what the standard Newton keyboards provide or include them in books, there will be a temptation to provide support for much of Unicode by reusing the Roman code points. (For example, you may be tempted to provide support for Zapf Dingbats that way, even though Unicode has a Zapf Dingbats block separate from the Roman block.) As a member of the Unicode Consortium, Apple strongly encourages Newton font developers to provide proper support for the Unicode Standard in their Newton fonts. Note, however, that the Newton OS doesn't support Unicode's bidirectional algorithm and doesn't provide for right-to-left text in general or glyph reordering and other sophisticated layout mechanisms required by South Asian scripts. Still, there's a lot of Unicode you cando on the Newton as is. What tools you need There are four tools which will be useful or needed to make Newton fonts. This document doesn't detail how the individual tools are used; see the documentation for the tools themselves for that information. [Image] Fissioner. Fissioner can be used to generate bitmap fonts from outlines. This tool will be needed if your font has only outlines and no bitmaps ('NFNT' resources). Warning! Fissioner requires QuickDraw GX! [Image] Fuser. Fuser embeds bitmaps in a TrueType font. It can accept either standard 'NFNT' bitmaps or the output of Fissioner. [Image] AATFontTool. This is a workhorse tool that examines a font and adds all kinds of useful tables. The only one which is of interest to Newton font developers is the Unicode cmap. [Image] TrueEdit. TrueEdit is a general purpose TrueType table editor. It lets you make virtually any change you want to a TrueType file. Like its even more general-pupose cousin, ResEdit, it's very powerful and very dangerous. Some related tools you may also find useful [Image] DumpCMAP. The DumpCMAP tool allows you to dump the contents of a font's 'cmap' table into a text file, which you can then edit. The edited file can subsequently be used as input to the FuseCMAP tool. (You can also use DumpCMAP's cojoined twin, DumpCMAPPost.) [Image] FuseCMAP. The FuseCMAP tool allows you to replace one of the mapping tables in a font's 'cmap' table with new contents, which you specify via a text file. To create this text file, you can use the DumpCMAP tool. Note that FuseCMAP won't create a new 'cmap' in a font for you; you have to use AATFontTool or TrueEdit to do that. [Image] DumpPOST. The DumpPOST tool allows you to dump the set of names defined in a font's 'post' table into a text file, which you can then edit. The edited file can subsequently be used as input to the AAT Font Tool. [Image] SbitEditor. SbitEditor is a tool for visually editing font sbit data. It also handles 'NFNT' to sbit conversion. Warning! The current version of SbitEditor can't edit fonts produced by the Newton Font Tool. (This is strictly speaking a bug in the Newton Font Tool and its output, but a future release of SbitEditor will include a workaround.) A note about copyrights Fonts are copyrightable and copyrighted. It is illegal to distribute other people's intellectual property without their permission. Do not use Apple's tools to create Newton versions of fonts which you then distribute without the permission of the original font designer. What you need to do The goal in making font for the Newton OS is to start with a Macintosh Font suitcase containing a TrueType font and end with a ResEdit file containing a TrueType font. You can then proceed to follow the steps outlined in the documentation for the Newton Font Tool. Step 1. Embed bitmaps in your TrueType font If your font already has Macintosh bitmaps in the form of 'NFNT' resources, you can use Fuser directly at this point to embed them in your TrueType font. If not, you can use Fissioner to create bitmaps and Fuser to embed the result in your font. (Reminder: Fissioner requires QuickDraw GX.) Step 2. Add a Unicode cmap If you've already got a Unicode cmap, you may want to skip this step. Or not. Running the AATFontTool over your font may reveal some problems with your Unicode cmap you didn't know about. The best way to add a Unicode cmap is with the AATFontTool. This is a very sophisticated font updating engine which will scan your font and, with a fair amount of intelligence, determine what Unicode code points are covered by your font, adding a Unicode cmap to cover them. Alternatively, you can use TrueEdit to create a Unicode cmap. Just select your Macintosh cmap and duplicate it. The result can be edited with TrueEdit rather clumsily, or more easily by using DumpCMAP/FuseCMAP. Step 3. Tweak your font The Newton OS uses some fields in the 'bloc' table which the Mac OS doesn't. The current versions of Fuser and SbitEditor are designed specifically for Mac OS fonts and so do not set these fields. You'll have to do it by hand. Open your font with TrueEdit. Double click on the 'bloc' table. You get a large and ugly dialog: [Image] The tweak needs to be made in the horizontal line metrics. Note that the fields "maxBeforeBL" and "minAfterBL" have been set to 0. Copy the values of the "ascender" and "descender" fields into "maxBeforeBL" and "minAfterBL", respectively. Click on the "Save" button. If you have more than one point size in your font, click on the "Bigger" button and repeat for every size in your font. [Image] If the font has a 'bhed' table, you'll have to convert it to an 'head' table. The 'bhed' and 'head' tables are identical. The Macintosh OS uses the 'bhed' table to flag a TrueType font as having only bitmap data and no outlines; the Newton OS doesn't follow this convention and requires an 'head' table. Double-click on the 'bhed' table to bring up TrueEdit's hex editor. Select the entire contents of the table and copy them. Now create a 'head' table, and option double-click on it to bring up the hex editor again. Replace its contents with what you've copied. While you're using TrueEdit, you'll probably want to make your font smaller by deleting any unnecessary tables. To delete a table, select it by clicking on it and then hit the Delete key. Do this for every table except: the 'bdat' table, 'bloc' table, 'cmap' table, 'head' table, 'hhea' table, 'hmtx' table, 'maxp' table, 'name' table, and 'post' table. You don't have to do this if you don't want, but it's a good idea on a platform like the Newton where memory can be at a premium. Step 4. Turn your suitcase into a resource file Open your font suitcase and drag the TrueType font out of it. You need to change its file type to 'rsrc' and creator to 'RSED'. (You have to do this because the Newton Toolkit only allows you to add text and resource files to your project.) You can change its type and creator with ResEdit, MPW, or any of a number of freely available tools. Step 5. There is no step 5. You're done. You can now proceed as you would if you had created the font with the Newton Font Tool. Printing Fonts created with this procedure will display correctly on the Newton but won't work correctly when the time comes to print. I haven't figured out why yet. Disclaimer Apple Computer, Inc. has ceased all development work on the Newton OS. Apple's Font Group is desirous to provide support for older and deprecated font formats, such as fonts for the Newton OS, but it is not a part of our formal charter and responsibilities. We do not and cannot guarantee that these techniques will work to create Newton OS fonts. They've worked for us, and we're reasonably confident that they'll work for you. ------------------------------------------------------------------------ Version 1.0.1 John H. Jenkins Copyright © 1998 by Apple Computer, Inc. All rights reserved. Last update: 9/24/98 by John H. Jenkins.