Closed Bug 498252 Opened 13 years ago Closed 13 years ago
font in OS X context menu is slightly too small
The font used in the OS X content menu has recently become too small. Attached is a screenshot showing the menu on a current trunk build (left), a nightly from 6/2 (middle), and Safari 4 (right). For example, the "B" in "Bookmark" and "Back" should be exactly 11 full pixels tall, on a nightly it's only 10 pixels (one of which is a light shade of gray). Beltzner fingered bug 489354 as the likely change for this, but I didn't test the specific regression range.
I was ready to file a bug... regression range http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=860a9acc39b1&tochange=69c6dbdfd179 changeset 6c8c900be875 is probable (bug 489354).
Component: Menus → GFX: Thebes
Product: Firefox → Core
QA Contact: menus → thebes
In converting nsSystemFontsMac to use Cocoa APIs, it wasn't always clear exactly how our font IDs should be mapped to NSFont selectors. It turns out that [NSFont menuFontOfSize:0.0], which I expected would give us the appropriate font for menu items (the doc says it "returns the menu items font with the default size") actually returns Lucida Grande 13.0, which is not what we want (or what other applications use) in these menus. Using [NSFont menuBarFontOfSize:0.0] instead ("the menu bar font with the default size") gives us the expected Lucida Grande 14.0.
Assignee: nobody → jfkthame
Attachment #383229 - Flags: review?(joshmoz)
I think [NSFont systemFontOfSize:0.0] would be better, since that's where the documentation mentions menu items.
(In reply to comment #3) > I think [NSFont systemFontOfSize:0.0] would be better, since that's where the > documentation mentions menu items. So it does. I guess I missed that because I was distracted by [NSFont menuFontOfSize:0.0], which also mentions menu items! However, testing shows that systemFontOfSize: is returning Lucida Grande 13.0, just like menuFontOfSize: .... it won't help us here. Looks like Apple is a little confused on this point: their applications are not doing what the Cocoa doc implies. So menuBarFontOfSize: seems to be the right way for us to get a font that matches the system menu bar and the contextual menus in other apps, despite the NSFont documentation.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
You're completely right, menuFontOfSize is the right one to use. The "menu items" that systemFontOfSize refers to are probably those that are used in the popup menus of popup buttons (<select>s). For those, the right font size is indeed 13.0. (At least if the popup button has the "regular" size. For small and mini ones, the font that's used for its popup menu items is of course even smaller.)
Verified with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090703 Minefield/3.6a1pre ID:20090703031521
Status: RESOLVED → VERIFIED
Hardware: x86 → All
You need to log in before you can comment on or make changes to this bug.