• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Leopard's Font Collection based on user's language
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Leopard's Font Collection based on user's language
      • From: Aki Inoue <email@hidden>
References: 
 >Leopard's Font Collection based on user's language (From: Ross Carter <email@hidden>)

  • Prev by Date: Re: Strategies to prevent class name clashes
  • Next by Date: Re: In-loop releasing of objects does not free memory?
  • Previous by thread: Leopard's Font Collection based on user's language
  • Next by thread: Re: Leopard's Font Collection based on user's language
  • Index(es):
    • Date
    • Thread