Re: Leopard's Font Collection based on user's language
Re: Leopard's Font Collection based on user's language
- Subject: Re: Leopard's Font Collection based on user's language
- From: Ross Carter <email@hidden>
- Date: Fri, 15 Feb 2008 11:22:35 -0500
On Feb 14, 2008, at 8:58 PM, Ross Carter wrote:
Leopard added a new font collection to the font manager panel: a
collection comprising fonts appropriate for the user's language
setting. (E.g., my collections are now All Fonts, English,
Favorites, etc.)
NSFontManager's collectionNames method does not return a name for
that collection. Is there any way to retrieve that collection's
contents, perhaps by using
fontDescriptorsInCollection:theSecretCollectionName ?
Duh. In the clear light of morning I can see that com.apple.UserFonts
does not refer to fonts in the user's Library/Fonts folder, but rather
to fonts appropriate for the user's language preference. I guess the
name of the collection can be obtained like this:
NSString *languageCode = [[NSLocale preferredLanguages] objectAtIndex:
0];
NSLocale *locale = [NSLocale currentLocale];
NSString *collectionDisplayName = [locale
displayNameForKey:NSLocaleLanguageCode value:];
Sorry for the noise.
Ross
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden