Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Apple > Operating Systems

  • Print
  • + Share This
  • 💬 Discuss

Fonts in Mac OS X: Font Formats

Given the complexities involved, Apple did a great job of implementing fonts in Mac OS X. For the casual user of Mac OS X, working with fonts included in Mac OS X is as simple as selecting a font and using it. The user will also be able to switch to different languages with greater ease than in Mac OS 9. But for users who want to add and delete their own fonts, who have problems getting certain fonts to work, or who have troubleshooting symptoms that may be font-related, this section provides essential background.

More than one type of font can be used on a Macintosh. As font formats are not a Mac OS X-specific issue, I will not go into great detail on font formats for this Mac OS X book. But especially for those who are new to the subject, following is a brief overview.

TrueType fonts

TrueType fonts are Apple's preferred type of font for Mac OS X. Most or all of the fonts that ship with Mac OS X are TrueType fonts. With TrueType, the font displays and prints smoothly (with no irregular jagged edges), no matter what size (such as 10 point vs. 13 point) or style (such as plain text vs. bold) you select.

For this feature to work, you need only a single font file for a given TrueType font. However, there will often be separate style variations within a font file (such as Times Italic and Times Bold). Without these variations present, you will not be able to select different styles for a given font in most Mac OS X applications.

Windows PCs can also use TrueType fonts, but a Windows TrueType font file has a somewhat different format from a Mac TrueType font. Fortunately, Mac OS X recognizes the following Windows versions of TrueType fonts: TrueType fonts (with the extension .ttf) and TrueType collections (with the extension .ttc). Note: Mac OS X believes that any font with a .ttf extension is a Windows TrueType font, so don't use this extension for Mac TrueType fonts.

PostScript fonts

These font files contain the PostScript instructions needed to print to PostScript-supported printers. If you don't have a printer that includes PostScript support, you are better off avoiding PostScript fonts and sticking with TrueType ones, if possible. No PostScript fonts ship with Mac OS X, but you may have some in your Mac OS 9 System Folder or may have added PostScript fonts to your Mac OS X System folder.

In Mac OS 9, you could not display PostScript fonts on the screen. PostScript fonts are printer font files that contain instructions only for printing the text to a PostScript printer. A matching screen font version (either a bitmap or TrueType version) was needed for display. This screen/printer font pairing did not always work well. Often, what you saw on the screen was different from what was printed. This situation improved significantly with the release of Adobe Type Manager (ATM). This utility uses the PostScript printer's font instructions to display the fonts on the screen.

ATM does not work in Mac OS X, but it is not really needed. Whereas Mac OS 9 used a technology called QuickDraw to display fonts, Mac OS X uses Quartz. Quartz can display PostScript printer font information with no additional software (such as ATM) required. Note: ATM still works in Classic for displaying text in Classic applications.

You may still need at least one matching TrueType or bitmap font to get some PostScript fonts (with a type of LWFN, as displayed by a utility such as XRay) to be listed in Fonts menus. PostScript fonts of the SFNT type should work without any separate matching version needed.

PostScript Multiple Master fonts (font files that end with MM) are not yet supported in Mac OS X.

OpenType fonts

This font format is relatively new, designed jointly by Microsoft and Adobe. A touted advantage of OpenType is that the same font file works on both the Mac and Windows platforms. At this writing, most Mac users still use TrueType instead of OpenType. OpenType fonts typically have the extension .otf. Microsoft started OpenType as an attempt to free itself from its dependence on Apple's TrueType. In a sense, the two formats are competitors.

Bitmap fonts

These fonts are the oldest type of fonts and are rarely used anymore. These fonts require a separate file for each size of the font (Times 10, Times 12, Times 14, and so on). If you select a size that does not have a separate file, the font will be jagged.

Although you may get these fonts to work in Mac OS X, especially when you're working in Classic, they are not supported, so you should avoid them. Especially avoid older bitmapped versions of Chinese/Japanese/Korean/ Vietnamese language fonts; these fonts will not work in Mac OS X. Also, older bitmapped fonts of the type FONT are not supported. Fonts of the type NFNT are supported for Classic/QuickDraw applications but ignored by applications based on Cocoa (such as TextEdit).

TAKE NOTE

True Type fonts, Data-Forks, and the .dfont File Extension

Mac OS X TrueType and .dfont. In Mac OS 9, a font file (like almost all Mac OS 9 files) has both a resource fork and a data fork. In brief, this fork distinction means that a file's main data (such as the text of a text document) is in the data fork, and the rest of its metadata (type and creator information, icon, and so on) would be stored as separate resources in its resource fork. Mac OS X's preference is to avoid resource forks and keep everything in the data fork. For fonts, Apple claims that this arrangement facilitates the capability of fonts to work in other OS systems, such as Windows, that do not recognize resource forks.

Data-fork-only font files must have the file extension .dfont.They may also have the file type dfon.

Essentially, a .dfont file is a TrueType font with all the resource-fork info moved to the data fork so that only the data fork remains. Mac OS X can read both old-style TrueType fonts and the new .dfont type. Apple clearly prefers the. dfont type, however, so that type is mainly what gets installed by Mac OS X. Old-style TrueType fonts may still be installed by third parties.

OpenType and Windows TrueType. OpenType fonts and Windows TrueType fonts also have all their data in the data fork and do not have the additional resources of Macintosh fonts.The data fork for Mac OS X TrueType format, however, is different from the data fork for TrueType font format used by Microsoft Windows.The difference is that data-fork Mac OS X files contain all the resources associated with a Macintosh font, including FOND and NFNT resources, which are used with QuickDraw Text. OpenType and Windows TrueType fonts do not have this information.

Want more info? By the way, if you are unfamiliar with terms such as FOND and NFNT resources, you can check out my other book, Sad Macs, for more details. You can also experiment with Apple's ResEdit utility to see these resources in Mac OS 9. Or you can pick up any number of books that delve into the details of Mac typography, such as the chapter on fonts in the latest edition of The Macintosh Bible (Peachpit Press).

Identifying font formats

You open a Fonts folder and see an assortment of fonts there. How can you tell which fonts are TrueType, PostScript, and Open Type? You can tell in several ways.

File extension. As I discussed earlier in this section, if a font file has an extension in its name, this extension can indicate the font type. The extension .otf, for example, is used for OpenType fonts.

Icon. You can identify PostScript printer font files via the file icons. Most PostScript printer font files have a distinctive icon such as the one shown in Figure 4.12.

Figure 4.12Figure 4.12 TrueType font vs. PostScript printer font file icons.

Show Info. Unfortunately, the Show Info window rarely is helpful in identifying fonts. You may get lucky; the Kind line in the General Information tab may say something like Data-Fork TrueType Font. Just as often, however, it will simply say Document.

Type/creator utility. As I discuss in chapters 3 and 6, numerous Mac OS X utilities can list a file's type and creator information. In Mac OS 9, every file needs to have these codes assigned. In Mac OS X, this information is optional. Most files (including most fonts), however, still include this information. I have already noted the use of such types as FONT, NFONT, SFNT, and LWFN. Additionally, most TrueType fonts will have a type of FFIL and a creator of DMOV.

Utilities that can display type and creator data include XRay and FileXaminer.

X Font Info. The useful freeware utility X Font Info will identify whether a font is TrueType, bitmap, or a screen font for a PostScript font. It cannot open PostScript printer font files directly, however.

SEE

"Take Note:Type and Creator vs. File Extensions," in Chapter 3, for more information on type and creator codes.

Figure 4.13Figure 4.13 The FileXaminer utility, showing the type, creator, and extension data for two TrueType fonts: (left) a dfont file in the System folder Library and (right) a OS9-type file in the User's Home directory Library.


TAKE NOTE

Font Suitcases

In Mac OS 9, a font could exist as an individual file or as one of several font files in a font suitcase. Mac OS X does not make this distinction as clearly. In particular, a font suitcase file in Mac OS X typically appears in the Finder exactly as a single font file does. In describing fonts in Mac OS X, Apple often uses the term suitcase to refer to virtually all font files.

Similarly, in Mac OS 9, if you wanted to remove a font file from a font suitcase, you could double-click the suitcase icon to open a window displaying its contents. Then you could drag a font file from the suitcase to remove it. You cannot do this in Mac OS X.

Thus, to remove a font from a suitcase file, the simplest approach is to reboot in Mac OS 9 and modify the font suitcase as desired via the Finder. Otherwise, you may find utilities that let you do this from Mac OS X (either in Mac OS X itself or via Classic), but I have not found any good ones so far.

A suitcase can contain unrelated fonts (such as Times and Helvetica). As a result, I prefer not to include mixed suitcases in Mac OS X, as the name of the font will likely give no clue about the variety of fonts within. In general, restrict suitcase files to the Mac OS 9 Classic System Folder, assuming that you need to use them at all.

More generally, it's wise to avoid as many Mac OS 9 Fonts as possible. These older fonts remain a too-common source of problems.

SEE

"Check fonts," in Chapter 5, for more on troubleshooting font problems.

Figure 4.14Figure 4.14 An Error message that may appear when you try to open a font in Mac OS X.

Figure 4.15Figure 4.15 (Left) TrueType font file icon and font suitcase icon as viewed when booted in Mac OS 9; (right) the icons for the same files after rebooting in Mac OS X.

TAKE NOTE

Opening Font Files in the Finder

In the Mac OS 9 Finder, if you double-clicked an individual font file, a window displayed what the characters in that font looked like. If you double-clicked a font suitcase, it opened to list all the fonts in that suitcase.

In Mac OS X, this method no longer works. Typically, double-clicking most types of font files in Mac OS X leads to an error message, stating,"There is no application available to open document {name of font}." If you happen to have the ancient Font/DA Mover utility on your drive, fonts may launch that utility in Classic; but don't expect it to work very well.

If you want to duplicate the Mac OS 9 Finder feature for fonts, the best solution I have found is a freeware utility called X Font Info. If you drag any font file or font suitcase to this application's icon, a window shows the name and kind (such as TrueType) of the font, as well as the alphabet in the characters of the font itself. In addition, two pop-up menus allow you to see this display in different styles (bold or italic, for example) and sizes. If the file you opened is a font suitcase that contains multiple fonts, the Font pop-up menu allows you to choose among the fonts in the suitcase.

You can go one better, however. When you double-click a font file, it can launch X Font Info, coming close to duplicating the Mac OS 9 Finder effect. To do this, follow these steps:

  1. Select almost any TrueType font in the Mac OS X /Library or /System/Library folder.

  2. Press Command-I to open the Show Info window for the font.

  3. Choose Open with Application from the pop-up menu in the Show Info window. The default application listed will likely be Finder, nothing, or (amazingly!) the old pre-Mac OS 9 Font/DA Mover 4.1.

  4. Click the box next to the application name and choose Other from the pop-up menu.

  5. From the pop-up menu list, choose X Font Info as the new application. If X Font Info is not in the list, select the "Other..." item to locate it.

  6. Click the Change All button so that all font files of the same type also open with this application.

Now, any similar font files that you double-click should launch X Font Info and display the font. If you selected an Mac OS 9-style TrueType font initially, this technique probably will not affect TrueType .dfont files. If so, simply repeat the procedure after selecting a .dfont file.

Overall, this method has worked well for me. There is a chance, however, that some font files may not display their Finder icon after you do this. And I have heard one report that this conversion prevented some fonts from being displayed in Microsoft Word and perhaps other applications. But this problem has never happened for me.

Figure 4.16Figure 4.16 The "Open with application" option in a font file's Show Info window.


Figure 4.17Figure 4.17 The X Font Info window.


  • + Share This
  • 🔖 Save To Your Account

Discussions

comments powered by Disqus