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 / Using the Font Manager


Getting the System or Application Font ID

When your application does not allow the user to change the font, your application has to tell the Font Manager to use either the system font or the application font. You do this by passing either the systemFont constant or the applFont constant to the TextFont procedure, which is described in the chapter "QuickDraw Text" in this book. The Font Manager maps fonts with other resource IDs to these values, as described in the chapter "Script Manager" in this book.

If you need to know the true font family ID of the system font, you can call the GetSysFont function, which checks the global variable SysFontFam and returns that resource ID. Similarly, if you want to know the true font family ID of the application font, you can call the GetAppFont function or check the global variable ApFontID.

The global variable SysFontSize contains the point size of the current system font. If you call the TextSize procedure (which is described in the chapter "QuickDraw Text" in this book) with a value of 0, the default application font size is used. You can find the default system font size value by calling the GetDefFontSize function. If the default system font point size is set to 0, the Font Manager uses 12 as its value.

You can read more about the system and application fonts in the chapter "Introduction to Text on the Macintosh" in this book.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996