Function

CTFontCopyLocalizedName

Returns a reference to a localized name for the given font.

Declaration

CFStringRef CTFontCopyLocalizedName(CTFontRef font, CFStringRef nameKey, CFStringRef  _Nullable *actualLanguage);

Parameters

font

The font reference.

nameKey

The name specifier. See Name Specifier Constants for possible values.

language

On output, points to the language string of the returned name string. The format of the language identifier conforms to the RFC 3066bis standard.

Return Value

A specific localized name from the font reference or NULL if the font does not have an entry for the requested name key.

Discussion

The name is localized based on the user's global language preference precedence. That is, the user’s language preference is a list of languages in order of precedence. So, for example, if the list had Japanese and English, in that order, then a font that did not have Japanese name strings but had English strings would return the English strings.

See Also

Getting Font Names

CTFontCopyPostScriptName

Returns the PostScript name of the given font.

CTFontCopyFamilyName

Returns the family name of the given font.

CTFontCopyFullName

Returns the full name of the given font.

CTFontCopyDisplayName

Returns the display name of the given font.

CTFontCopyName

Returns a reference to the requested name of the given font.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software