Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Text /
Chapter 4 - Font Manager / About Font Resources


Font Family IDs

Several of the Font Manager routines and data structures make use of a font ID value, which is actually a font family ID value. The valid values for font family IDs, like the resource IDs of all script-specific resources, are subdivided into ranges for each script system, with half of the total range allocated for Roman font families and 512 IDs allocated for each other script system. The ranges for each non-Roman script system are listed in the appendix "International Resources" in this book.

The system software keeps track of two font family IDs. It uses the system font for drawing items such as system menus and system dialog boxes. The application font is the font that your application will use for text unless specified otherwise by you or the user. In Roman script systems, the system font is Chicago, the system font size is 12 points, and the application font is Geneva. In other script systems, the system and application fonts are defined in the international resources. The Script Manager variables smScriptSysFond, smScriptAppFond, smScriptSysFondSize, and smScriptAppFondSize, which define the system and application fonts and font sizes for each script system, are described in the "Script Manager" chapter in this book.

Font family ID values 0 and 1 are reserved. The system software always maps the system font to font 0 and the application font to font 1. The Roman font family ID range is itself subdivided as shown in Table 4-1.

Table 4-1 Subdivisions of Roman font family IDs
ID rangeUse
2-255Mostly older font families that use the 'FONT' resource numbering method. Do not use these IDs.
256-1023Reserved numbers that should not be used for family IDs. The Font/DA Mover program uses this range of IDs to resolve font conflicts.
1024-16382Commercial fonts. This is the range of IDs that all Roman font families should use.
16383Reserved. Do not use.

The Font Manager defines constants for the system font and the application font, as well as for several of the older font IDs in the range from 2 to 255. These constants are presented here; however, you need to use the older font ID constants with caution, since most of them have become obsolete.

CONST
   systemFont = 0;      {the system font}
   applFont = 1;        {the application font}
   newYork = 2;         {hard-coded New York font ID}
   geneva = 3;          {hard-coded Geneva font ID}
   monaco = 4;          {hard-coded Monaco font ID}
   venice = 5;          {hard-coded Venice font ID}
   london = 6;          {hard-coded London font ID}
   athens = 7;          {hard-coded Athens font ID}
   sanFran = 8;         {hard-coded San Francisco font ID}
   toronto = 9;         {hard-coded Toronto font ID}
   cairo = 11;          {hard-coded Cairo font ID}
   losAngeles = 12;     {hard-coded Los Angeles font ID}
   times = 20;          {hard-coded Times Roman font ID}
   helvetica = 21;      {hard-coded Helvetica font ID}
   courier = 22;        {hard-coded Courier font ID}
   symbol = 23;         {hard-coded Symbol font ID}
   mobile = 24;         {hard-coded Mobile font ID}
The Script Manager provides functions that allow you to determine which script a font belongs to. For more information, see the chapter "Script Manager" in this book.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996