Font size in NSTableView
Christiaan Hofman <[email protected]>
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
I am confused about what font and row height to use in table views. IIRC, in the past IB used 12pt for a new tableview instance. Currently, in 3.x, it is using 13pt. The HIG seems to suggest 12pt, though it's not using the same terms as Cocoa does (e.g. 'view font' and 'application font' have no clear association in NSFont's API), so it's hard to associate. And what is the row height to use? Generically, I would expect that the row height should be equal to the line height of the font. But of course that is not an ambiguous statement, as it depends on what typesetting behavior is used to calculate the line height. IIRC, this used to be NSTypesetterBehavior_10_2_WithCompatibility, and AFAICS this is consistent with the typesetting and cellSize of NSCell. However, it is not consistent with the row height of NSTableView and NSOutlineView in IB 3.x (which uses row height 17, 14, and 11 for regular, small, and mini controls, with fonts 13, 11, and 9; while NSTypesetterBehavior_10_2_WithCompatibility gives a line height of 12 for a 9pt system font). So my most pressing questions are which is wrong about regular sized table views: HIG or IB (because they're obviously not in agreement)? And which row height should I use resp. which typesetting behavior should I use to calculate Cocoa view layout (I do need this in more general situations)? thanks, Christiaan