| Summary: | [cocoa][10.11] bold/italic system fonts render with baseline too low | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Markus Keller <markus.kell.r> | ||||||||||
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||||||||
| Status: | CLOSED DUPLICATE | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | a.nesheret, arunkumar.thondapu, ivanooi, lshanmug, luo820802, mikael.barbero, mober.at+eclipse, p.beauvoir, peter, torkildr | ||||||||||
| Version: | 4.5.1 | ||||||||||||
| Target Milestone: | 4.7 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Mac OS X | ||||||||||||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=495097 | ||||||||||||
| Whiteboard: | |||||||||||||
| Bug Depends on: | |||||||||||||
| Bug Blocks: | 482454, 494879 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Markus Keller
Created attachment 259436 [details]
SnippetBold.java
(In reply to Markus Keller from comment #0) > I think this only started in 10.10 or 10.11. 10.10 is still fine. Let's not go to Apple's San Francisco :-(. Apart from making the system font hard to access, they also seem to have missed that different styles of the same font should work together. When I inspect the fonts in /System/Library/Fonts/ with Quick Look (Space key) or the Inspector (Command+Option+I), then the SFNS* fonts show quite some variation in baseline positioning. For normal fonts like Arial and Courier New (in /Library/Fonts/), that's not the case. I don't really know how to tackle this. SWT's implementation in Font#init(..) looks pretty straightforward. May be we should open a bug with Apple. This needs more investigation and will not be possible in 4.6 time frame. *** Bug 494547 has been marked as a duplicate of this bug. *** Created attachment 262118 [details]
Preference view
I see the same problem using the normal variation of the font. This on:
Eclipse IDE for Eclipse Committers
Version: Neon Release Candidate 2 (4.6.0RC2)
Build id: 20160526-1324
However I only see it in the navigator for the preference view. Not in the "Package Explorer" or the "Project Explorer".
(In reply to Torkild Resheim from comment #5) > I see the same problem using the normal variation of the font. That's bug 495097. > However I only see it in the navigator for the preference view. Not in the > "Package Explorer" or the "Project Explorer". The Package Explorer and Project Explorer views use custom draw to render colorized labels. Looks like this only affects native label. Please add your OS X version in bug 495097. *** Bug 498394 has been marked as a duplicate of this bug. *** I've tried to remove the call to super.drawInteriorWithFrame_inView in Tree.drawInteriorWithFrame_inView and reuse the logic when "userForeground != null" to draw the text myself. Despite several tests, I did not manage to change the location of the bold text. I've also tried to add attribute NSBaselineOffsetAttributeName to the cell's NSAttributedString. Again, no visible effect :(. I will try some more things in Obj-C to see how it behaves and check wether the issue is from Apple or the SWT impl. I've tried an NSOutlineView with bold font directly in a Obj-c Cocoa application, and the issue does not appear with system fonts (OS X 10.11.6 - San Francisco). However, as soon as I switched to another font (e.g. Helvetica Neue), the issue appears. In the native app, the font is set directly on the NSTextFieldCell. I've also tried to do that directly in Tree.drawInteriorWithFrame_inView, with the bold system font, but it does not fix the issue. Like Markus, I don't know how to tackle this. Created attachment 264877 [details]
Another Snippet showing this in a Tree
Seeing this now in my RCP application for Mac OS X in Trees and Tables.
The problem is bold font is fixed via Bug 481144. The problem with italic font is tracked via 510741 *** This bug has been marked as a duplicate of bug 481144 *** |