• 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
fontManager:willIncludeFont: is never called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fontManager:willIncludeFont: is never called


  • Subject: fontManager:willIncludeFont: is never called
  • From: Jim Balhoff <email@hidden>
  • Date: Fri, 8 Aug 2003 15:56:55 -0400

Hi all,

I've seen this problem in the archives three times, but there were no replies to any of them! I am trying to only show fixed pitch fonts in the font panel. The NSFontManager documentation says that the delegate will be sent "fontManager:willIncludeFont:" to request permission from the delegate to include a font in the font panel.

I've set my object to be the fontManager's delegate and implemented this method, but this message is never sent. The header for NSFontManager has this to say:

/* This method is perhaps inappropriately named; it is sent to the delegate of the shared NSFontPanel instance, not to the delegate of the NSFontManager.
*/
@interface NSObject(NSFontManagerDelegate)
- (BOOL)fontManager:(id)sender willIncludeFont:(NSString *)fontName;
@end

So, I set my object to be the delegate of the font panel instead. It is not called then, even after sending the font panel a "reloadDefaultFontFamilies" message:

Triggers a reload to the default state, so that the delegate will be called. This reloading provides the delegate opportunity to scrutinize the default list of fonts to be displayed in the panel.

Has anyone actually gotten this to work?

Thanks for your help,
Jim Balhoff
_______________________________________________
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.

  • Follow-Ups:
    • Re: fontManager:willIncludeFont: is never called
      • From: Dylan Adams <email@hidden>
  • Prev by Date: Re: String Encoding Detection (Revisited)
  • Next by Date: Re: String Encoding Detection (Revisited)
  • Previous by thread: Re: NSShortTimeDateFormatString still supported?
  • Next by thread: Re: fontManager:willIncludeFont: is never called
  • Index(es):
    • Date
    • Thread