A Cocoa-based user interface for easily selecting NSFont objects.
Questions tagged [nsfontpanel]
23 questions
7
votes
5 answers
Using NSFontPanel in Cocoa
I'm trying to use an NSFontPanel to allow the user to change an application-wide font setting. It's supposed to work something like this: the user clicks a button, a font panel pops up, they choose a font and a size, and their selection is…

conmulligan
- 7,038
- 6
- 33
- 44
6
votes
1 answer
NSFontManager selectedFont returning null
Okay so I've checked all over S.O. and all over Google and I can't find what is wrong with my code:
- (IBAction)selectFont:(id)sender
{
NSFontManager *fontManager = [NSFontManager sharedFontManager];
[fontManager setDelegate:self];
…

Liftoff
- 24,717
- 13
- 66
- 119
4
votes
1 answer
Why isn't changeFont: being called from my NSFontPanel?
I'm creating an NSFontPanel but selecting a font doesn't call the changeFont: method.
I have these methods defined in an NSWindowController subclass:
- (IBAction)showFontPanel:(id)sender {
[[NSFontPanel sharedFontPanel]…

SSteve
- 10,550
- 5
- 46
- 72
4
votes
1 answer
Select a font in NSFontPanel
I would like to open the NSFontPanel with a font (in the following example Helevtica) selected initially. I mean that when the font panel shows up, the collection and family values are selected. Here is my code:
NSFontManager * fontManager =…

AmaltasCoder
- 1,123
- 3
- 17
- 35
4
votes
2 answers
Customizing Cocoas NSFontPanel
What customization options are there for Cocoas NSFontPanel?
The NSFontPanel accessible in iWork Pages has "Text Underline", "Text Strikethrough" and "Document Color" controls at the top. We don't want these in our NSFontPanel. Is there any way to…

ksullivan
- 496
- 1
- 7
- 12
3
votes
1 answer
validModesForFontPanel never called
I have an application where I use the NSFontPanel.
I open the font panel like this:
NSFontManager *fontManager = [NSFontManager sharedFontManager];
[fontManager orderFrontFontPanel:self];
[fontManager setDelegate:self];
[fontManager…

pajevic
- 4,607
- 4
- 39
- 73
3
votes
4 answers
Name and size from NSFont
i've tried to find something in the Internet, but right now I don't have an answer, so it would be great if you can help me!
So far I have a NSFont object, but I would like the name (as NSString) and size of the font, so I can output that! It's…

qwertz
- 14,614
- 10
- 34
- 46
3
votes
0 answers
Xcode plugin for selecting font?
Is there some handy Xcode plugin allowing us to select fonts the way ColorSense allows us to conveniently work with colors in code?
Something that would e.g. display a font dialog and return the appropriate NSFont initializer call as text in the…

cacau
- 3,606
- 3
- 21
- 42
3
votes
1 answer
How to make NSColorPanel (using NSColorWell) and NSFontPanel's color panel co-exist?
I have a preferences panel in my application in which I have a NSColorWell for setting some background color and a button which opens an NSFontPanel for choosing a font.
The behavior I want to have is the following:
When I click on the NSColorWell…

Form
- 1,949
- 3
- 25
- 40
2
votes
1 answer
How can I get NSFontManager selected font?
I can't get selected font in NSFontManager. What I need:
1) I need to get selected font title, size, color?
I am calling NSFontManager with button like this:
[[NSFontManager sharedFontManager] orderFrontFontPanel:self];
It's opening but I don't…
user1150322
2
votes
1 answer
How to set the defaults for an NSFontPanel?
I'm setting up the preferences window for my cool app, which displays some text. In preferences I've set up a button that opens an NSFontPanel. My app stores the user's preferred text color and font, and always opens with those settings so that the…

Ziggy
- 21,845
- 28
- 75
- 104
2
votes
1 answer
NSTextField eating NSFontPanel..?
I'm having a weird problem receiving any messages from an NSFontPanel when an NSTextField in my app is focussed.
Even a subclass of NSTextField doesn't receive anything from the font panel.. it seems that everything sent by the panel e.g. when…

ATV
- 4,116
- 3
- 23
- 42
2
votes
1 answer
NSFontPanel changeFont not called
I'm trying to use a font panel in my Cocoa app and I can't get the changeFont: method to be called.
I had it working properly in another app and I just copied and pasted the code over but for some odd reason the changeFont method isn't called…

guitarflow
- 2,930
- 25
- 38
1
vote
1 answer
NSTextView not changing font size or colour from NSFontPanel
I created a basic NSTextView, I selected the following options in Interface Builder:
Editable
Selectable
Field Editor
Rich Text
Undo
Graphics
Non-contiguous Layout
Font Panel
Ruler
Inspector Bar
I set the NSViewController to be the delegate of the…

gbdavid
- 1,639
- 18
- 40
1
vote
1 answer
how can i set attributes of NSFontPanel?
How can i set font attributes of NSFontPanel, like color, bold etc ?

Richa Vijayvargiya
- 209
- 1
- 3
- 6