APPLE FONT TOOL OVERVIEW The Apple Font Tool is a simple application which allows you to select an existing bitmap font and to generate a font file containing the FOND and sfnt resources. Once this embedded font is generated, it can be included into your Newton application to customize the fonts it uses. USER INTERFACE DESCRIPTION The File Menu: Ê To convert a Macintosh bitmap font into an embedded sfnt or outline font, open the font by choosing "Open Apple bitmap..." under the File menu and choosing the desired bitmap font. A dialog like the one below will appear. Choose the point size(s) you would like included in the converted sfnt font file. Ê If you had set the font attribute toggle on (cmd-T), the following dialog will be displayed next. This will allow the font attributes for each chosen point size in the font family to be set. The default settings are shown below: Ê If the font attribute toggle was set to off, the attributes dialog will not appear and will set all the chosen point sizes the default attributes of sorted unicode only with index format 3 and data format 1 which are the desired setting for most fonts to be integrated into the Newton ROM. If the fonts contain special characters in the range 10-1F (and recently 01-03), the Newton unicode option must also be selected. This will assign the glyphs located in the pre-specified range the values FC00-FC0F (and F714-F716). Once the attributes for each point size has been set, a save dialog will appear and the sfnt font file will be generated. Another feature of the font tool is generating a metrics only sfnt font file. Setting the metrics only toggle on will generate a file with the minimum resources needed to produce a file containing only the widths information of the fonts. CREATING FONT PACKAGES USING NEWTON TOOLKIT (NTK) Fonts created with the Apple Font Tool can be built into a Newton Toolkit package that can be installed in the Newton system or built into a Newton application. CREATING AND INSTALLING A SYSTEM FONT PACKAGE To create a Newton system font package using NTK, first run ResEdit, open the Font Tool output and change the file type to 'rsrc' and the creator to 'RSED'. Close and save the changes. Create a new project in NTK. Add the Font Tool output to the project. Next, copy the text file included on the installer disk, ÒFontTemplateÓ, replacing references of Òfont_outputÓ with the name of the Font Tool output. Add the text file to the project. Open Output Settings... and select Custom Part. Enter the word ÔfontÕ (no quotes) in the associated box. Enter the word ÔoutputÕ (no quotes) in the Results field. Build and download the package to the Newton. The fonts that are currently installed in the system are available in the global variable ÔfontsÕ. This variable will list a frame containing your new font. Any application can use the installed font by adding a viewFont slot and specifying the new font family name (once again, replace Òfont_outputÓ with the name of the Font Tool output): {family: '|font_output|, face: 0, size: 18 } You can also set the system default user font in the ÔuserFontÕ slot of the ÔuserConfigurationÕ global variable: userConfiguration.userFont := {family: '|font_output|, face: 0,size: 18} This will result in all recognized text to be displayed in the specified font. BUILDING A FONT PACKAGE INTO A NEWTON APPLICATION The system font package described above can also be built into a Newton application using NTK. Add the system font package to a new or existing NTK project. In each view that the font is desired, add a viewFont slot with the following information (as described in the previous section): {family: '|font_output|, face: 0, size: 18 } Build and download the application package. Views that have the viewFont slot added and initialized will utilize the new font. See the App Font sample project in the Samples folder for an example of building a font package into an application. For more information, see the related sections of the Newton ProgrammerÕs Guide, ÒSpecifying a FontÓ in the chapter ÒWorking with View ClassesÓ and ÒFont FunctionsÓ in the chapter ÒUtility FunctionsÓ. COMPATIBILITY ¥ Make sure you are using System 7.0 and above when using the font tool. ¥ 2-byte fonts are not, yet, supported in the font tool.