• 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: Monospace fonts and NSFontPanel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Monospace fonts and NSFontPanel?


  • Subject: Re: Monospace fonts and NSFontPanel?
  • From: Scott Anguish <email@hidden>
  • Date: Fri, 25 Jul 2003 04:26:18 -0400

look at fontManager:willIncludeFont: <http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSFontManager.html#//apple_ref/occ/ cl/NSFontManager>

it's a delegate method on NSFontManager that you can implement to filter fonts... it'll ask you for each font, and you can check to see if the font is monospaced.

you're probably best to do that by caching the results of the availableFontNamesWithTraits: using NSFixedPitchFontMask as the parameter and then checking each of the font names that you get back to see if they're in that list. (the array containsObject:)


On Friday, July 25, 2003, at 3:45 AM, Francisco Tolmasky wrote:

How do I get a font panel to only show monospaced fonts?

Francisco Tolmasky
email@hidden
http://users.adelphia.net/~ftolmasky
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Monospace fonts and NSFontPanel? (From: Francisco Tolmasky <email@hidden>)

  • Prev by Date: working with font manager
  • Next by Date: %f and decimal places
  • Previous by thread: Monospace fonts and NSFontPanel?
  • Next by thread: making a sheet back into a window
  • Index(es):
    • Date
    • Thread