• 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
NSFontManager question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSFontManager question


  • Subject: NSFontManager question
  • From: Robert Clair <email@hidden>
  • Date: Fri, 12 Dec 2003 17:15:54 -0500
  • Resent-date: Fri, 12 Dec 2003 17:43:26 -0500
  • Resent-from: Robert Clair <email@hidden>
  • Resent-message-id: <email@hidden>
  • Resent-to: Cocoa List <email@hidden>

I am trying to build my own font panel and have run into one thing I cannot get to work.
My action routine for setting the font size is below. It works except for one case -
multiple selections. When you have a selection with multiple fonts, moving the slider on the system font panel will scale all of the fonts. This one does nothing with a multiple selection. Does anybody know what is need to get it to work ?

Also, what is the argument of

modifyFontViaPanel: (id) sender

supposed to be ? The docs scrupulously avoid telling you and as a practical matter it seems to have no effect.

Thanks,

Bob


- (IBAction) handleFontSize:(id)sender
{
[fontSizeTextField setIntValue: [sender intValue]];
[fontSizeSlider setIntValue: [sender intValue]];
[fontSizeStepper setIntValue: [sender intValue]];

NSFontManager* fontManager = [NSFontManager sharedFontManager];
NSFont* currentFont = [fontManager selectedFont];

BOOL isMultiple = [fontManager isMultiple];

NSFont* newFont = [fontManager convertFont: currentFont
toSize: (float) [sender intValue]];

[[NSFontPanel sharedFontPanel] setPanelFont: newFont
isMultiple: isMultiple];

[fontManager modifyFontViaPanel: self];
}
_______________________________________________
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.

  • Prev by Date: Capture a Finder Event
  • Next by Date: Re: textShouldEndEditing Issues!
  • Previous by thread: Capture a Finder Event
  • Next by thread: Re: textShouldEndEditing Issues!
  • Index(es):
    • Date
    • Thread