Important: The information in this document is obsolete and should not be used for new development.
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 thesystemFont
constant or theapplFont
constant to theTextFont
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 variableSysFontFam
and returns that resource ID. Similarly, if you want to know the true font family ID of the application font, you can call theGetAppFont
function or check the global variableApFontID
.The global variable
SysFontSize
contains the point size of the current system font. If you call theTextSize
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 theGetDefFontSize
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.