I’m trying to determine which font is a selection in a (styled) TextArea defined as “System” font.
the TextArea.SelTextFont reports “.Helvetica Neue DeskInterface” which is btw not a valid font name among the list of installed.
This happens on Yosemite.
How I translate this to the Helvetica Neue
(I also noticed Helvetica Neue is slightly different from this)
In another thread about a similar issue between Lucida Grande and Helvetica Neue (where we did not know there were yet another hidden HelveticaNeueDeskInterface.ttc) Joe advised againts choosing any other font, as apparently Apple is adamant about using the system font.
[quote]Querying Standard Font Variations
Using the methods of NSFont listed in Table 6-2, you can query all of the standard font variations. To request
the default font size for the standard fonts, you can either explicitly pass in default sizes (obtained from class
methods such as systemFontSize and labelFontSize), or pass in 0 or a negative value.
Table 6-2 Standard font methods
Font Methods
System font [NSFont systemFontOfSize:[NSFont systemFontSize]]
Emphasized system font [NSFont boldSystemFontOfSize:[NSFont systemFontSize]]
[NSFont systemFontOfSize:[NSFont
smallSystemFontSize]]
Small system font
[NSFont boldSystemFontOfSize:[NSFont
smallSystemFontSize]]
Emphasized small system font
[NSFont systemFontSizeForControlSize:
NSMiniControlSize]
Mini system font
[NSFont boldSystemFontOfSize:[NSFont
systemFontSizeForControlSize: NSMiniControlSize]][/quote]
Now, as much as I understand the need for a label, or any other control, to use the Cocoa System font, I do not see much interest into poluting a word processor with an ugly, inconsistent font not present on all versions of the system. After all, it is the privilege of the user to decide which font he wants to use as default. I would simply replace system by my own choice.