6.1. The Situation under Mac OS 9

Before discussing fonts, one quick word on managing files on the Macintosh. One of the Mac's idiosyncrasies is the dual nature of its files: every Macintosh file may have a part containing data and a part containing resources [49, p. I-103]. A resource is a set of data associated with a type (a string of four characters), a number, and possibly a name. As its name suggests, the data part usually contains data, whereas the resource part contains executable code, components of a user interface (menus, dialog windows, etc.), and all sorts of other "resources".

The two parts, data and resources, are connected in a transparent manner, and the Macintosh windowing manager, called the Finder, displays only one object, represented by an icon. A Macintosh file may lack a data part (as do some executable files, for example) or a resource part. In the latter case, it is often represented by a "generic" icon in the Finder.

This phenomenon occurs because the icons used to represent files are selected by the Finder from two pieces of information contained not in the file itself but in the directory of files on the disk's partition: this information is also stored as strings of four characters called the creator and the type of the file. Thanks to the "creator", the Finder can launch the correct application when we double-click on a file's icon, wherever the application may be stored on the disk(s). Thanks to the "type", the application in question knows what ...

Get Fonts & Encodings now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.