Carbon


ATSUFontCount

Header: ATSUnicode.h Carbon status: Supported

Determines the number of fonts installed on a user’s system.

OSStatus ATSUFontCount (
    ItemCount *oFontCount
);
Parameter descriptions
oFontCount

On return, a pointer to the number of ATSUI-compatible fonts installed on the user’s system. You cannot pass NULL for this parameter.

function result

A result code.

DISCUSSION

The ATSUFontCount function determines the number of fonts on a user’s system that are compatible with ATSUI. Incompatible fonts include those that cannot be used to represent Unicode, the last resort font, and fonts whose names begin with a period or a percent sign. You can use the count passed back in the oFontCount parameter to determine the amount of memory to allocate for the oFontIDs array in the function ATSUGetFontIDs.

It is important to note that the number of available fonts may change while your application is running. Although fonts cannot be removed from the Fonts folder while an application other than the Finder is running, they can be removed from other locations, resulting in a decrease in the font number.

In addition, just because the number of fonts stays the same between two successive calls to ATSUFontCount, that does not mean that the font lists are the same. It is possible for a font to be added and another removed between two successive calls of ATSUFontCount, leaving the total number unchanged.

VERSION NOTES

Available beginning with ATSUI 1.0.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.5 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)