Carbon


Font Name Platform Constants

Header: SFNTTypes.h

enum {
    kFontUnicodePlatform = 0,
    kFontMacintoshPlatform = 1,
    kFontReservedPlatform = 2,
    kFontMicrosoftPlatform = 3,
    kFontCustomPlatform = 4
};

Constant descriptions

kFontUnicodePlatform

Identifies the Unicode character code specification as the platform of the font name string.

kFontMacintoshPlatform

Identifies one of the Macintosh character code sets as the platform of the font name string.

kFontReservedPlatform

Reserved for future use.

kFontMicrosoftPlatform

Identifies one of the Microsoft character code sets as the platform of the font name string.

kFontCustomPlatform

Identifies the default platform as defined by the font for the platform of the font name string. If you specify this constant, the character encoding of a font does not correspond to a specific standard.

ATSUI identifies the encoding of a particular font name string by a constant of type FontPlatformCode. You can use one of these constants as part of your search criteria in the functions ATSUFindFontFromName and ATSUFindFontName. The function ATSUGetIndFontName passes back a constant of this type to represent the font name string encoding.

The font name platform code identifies the encoding of the name string, which ATSUI uses to determine whether or not it can render the string. A font can support multiple encodings.

Unicode-encoded font name entries have 8-bit instead of the expected 16-bit names. As a result, to locate a Unicode-encoded font name string, you must use the constant kFontMacintoshPlatform with the Unicode script code constant representing the script ID of Unicode encoding you want to find.

You can pass the kFontNoPlatform constant if you do not care about the encoding of a font name string. In this case, ATSUFindFontName and ATSUFindFontFromName will pass back the first font in the name table that matches the other font name parameters that you specified.


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