This is especially worse with "Helvetica Neue" which is kinda standard font (in iOS) and likely to play a bigger role in future OS X versions. I'm not aware of a way to adjust individual controls other than changing the font, but I found a way to render text correctly with own computations. Key is here not to use the string height (e.g. for centering or placing the string), but to take the ascender and xHeight into account.
The following code draws the title of an NSTextFieldCell vertically centered, regardless of the font used:
- (NSRect)titleRectForBounds: (NSRect)theRect
{
NSRect titleFrame = [super titleRectForBounds: theRect];
CGRect rect = [self.attributedStringValue boundingRectWithSize: NSMakeSize(FLT_MAX, NSHeight(titleFrame))
options: 0];
titleFrame.origin.y -= NSHeight(rect) - floor(self.font.ascender);
titleFrame.origin.y += floor((titleFrame.size.height - self.font.xHeight) / 2);
return titleFrame;
}
- (void)drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView *)controlView
{
NSRect titleRect = [self titleRectForBounds: cellFrame];
[self.attributedStringValue drawInRect: titleRect];
}
The cell is part of an NSOutlineView and hence flipped. For non-flipped content the solution is probably a bit simpler (haven't tested that).