Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 495097

Summary: [Cocoa] Some text is rendered below the expected alignment line
Product: [Eclipse Project] Platform Reporter: Liviu Ionescu <ilg>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: a.nesheret, arunkumar.thondapu, cdtdoug, eclipse.sprigogin, ericwill, ilg, ivanooi, lshanmug, malaperle, markus.kell.r, matthias.sohn, ned.twigg, peter, pwebb, torkildr
Version: 4.6   
Target Milestone: 4.6.2   
Hardware: Macintosh   
OS: Mac OS X   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=486734
Whiteboard:
Attachments:
Description Flags
Properties window with bad text alignment none

Description Liviu Ionescu CLA 2016-06-01 02:49:50 EDT
Created attachment 262144 [details]
Properties window with bad text alignment

Attached in a picture with two such problems:

- the lower parts of some lower case letters are not visible
- the button labels are too low

The problem affects only some widgets and was introduced with Neon.
Comment 1 Arun Thondapu CLA 2016-06-01 09:20:01 EDT
Probably a duplicate of bug 486734?
Comment 2 Doug Schaefer CLA 2016-06-01 10:01:45 EDT
Might be similar, but that bug talks about bold/italic. I believe the fonts we're seeing are also normal fonts.
Comment 3 Markus Keller CLA 2016-06-01 14:27:30 EDT
I can't reproduce the problem with non-bold fonts on OS X 10.11.5.

OS version?
Eclipse version?
Do you use a custom system font or other OS customizations?
Comment 4 Liviu Ionescu CLA 2016-06-01 14:34:31 EDT
> OS version?

10.11.5

> Eclipse version?

Eclipse Platform

Version: Neon (4.6)
Build id: I20160525-2000

> Do you use a custom system font or other OS customizations?

nope, system should be pretty standard.

all locales set to English or UK English if more specific settings are required.

system installed from scratch as 10.11.1 and updated step by step to 10.11.5.


be sure you check the Properties window, as in the attached picture.
Comment 5 Torkild Resheim CLA 2016-06-01 14:39:38 EDT
Seeing the same issue as Liviu (in the preferences dialog) on:

Eclipse IDE for Eclipse Committers

Version: Neon Release Candidate 2 (4.6.0RC2)
Build id: 20160526-1324

OS X version 10.11.5 (15F34). Norwegian locale, but I doubt that matters.
Comment 6 Torkild Resheim CLA 2016-06-01 14:43:59 EDT
The dialog font is the default one: .SF NS Text 11. If I switch to Helvetica I get the same issue. But switching to the previous system default, Lucida Grande, fixes it. So it's apparently related to different baselines on the fonts.
Comment 7 Marc-André Laperle CLA 2016-06-01 15:01:56 EDT
Does this also happen with Eclipse 4.5.2? Maybe it's related to the new HiDPI support? I'll do some testing as well when I get back to my Mac.
Comment 8 Torkild Resheim CLA 2016-06-01 15:26:15 EDT
Hi Marc-Andre,

I just tested using 4.5.2 and I think you're right. The preferences dialog renders nicely on that version.
Comment 9 Marc-André Laperle CLA 2016-06-01 20:51:45 EDT
I'm seeing something interesting: the first time I start Eclipse, the bug is there. If I do File > Restart, it goes away. Perhaps the HiDPI support gets disabled at restart so I'm seeing two bugs cancelling each another :)
Comment 10 Liviu Ionescu CLA 2016-06-22 17:02:14 EDT
any chance for this bug to be fixed in SR1?

I'm getting questions if it is worth to update to Neon and my current answer is to wait until SR1.
Comment 11 Marc-André Laperle CLA 2016-06-22 17:14:03 EDT
(In reply to Liviu Ionescu from comment #10)
> any chance for this bug to be fixed in SR1?

One thing that might help: since we know that it's a regression in Eclipse itself, we can bisect it and find the commit then notify the author of the commit.

Liviu, do you want to try to do that? Here are the two repos that could be bisected:
http://git.eclipse.org/c/platform/eclipse.platform.swt.git/
http://git.eclipse.org/c/platform/eclipse.platform.swt.binaries.git/

(the binaries have to more or less match the normal repo)
Comment 12 Liviu Ionescu CLA 2016-06-22 17:51:11 EDT
I tried to take a look, but things are too unfamiliar for me to identify the problem.

and I'm not sure it is a regression, I would say it is an incomplete attempt to support the new macOS features, like HiRES displays.
Comment 13 Ned Twigg CLA 2016-07-13 18:27:39 EDT
Is there a flag we can set to disable HiDPI support, until it gets fixed?
Comment 14 Arun Thondapu CLA 2016-08-29 04:18:53 EDT
(In reply to Ned Twigg from comment #13)
> Is there a flag we can set to disable HiDPI support, until it gets fixed?

There is actually a flag which disables HiDPI support on Windows and Linux (see [1] for details) but it doesn't do anything on the Mac as most of the HiDPI support on Mac OS X comes from the OS itself and AFAIK there is no way to disable that scaling. Its unlikely that this bug is related to any HiDPI changes for Mac and needs to be investigated further.

Moving to 4.6.2 for now.

[1] https://www.eclipse.org/eclipse/news/4.6/platform.php#swt-autoscale
Comment 15 Mikaël Barbero CLA 2016-09-09 11:20:58 EDT
*** Bug 500965 has been marked as a duplicate of this bug. ***
Comment 16 Marc-André Laperle CLA 2016-09-23 11:49:50 EDT
I started to bisect SWT but I quickly had problems because the issue never shows up in the runtime Eclipse launched. So I started building the whole SDK in hope of bisecting the whole SDK and after the first build, I noticed that on the very first launch, the bug is not there but any subsequent launch it is there. Even switching to a new workspace, the bug is still there - only the very first time an Eclipse installation is started the bug is not there. So I thought there had to be something getting modified in the configuration area the very first time: the culprit is Eclipse.app/Contents/Eclipse/configuration/.settings/org.eclipse.ui.ide.prefs. If I delete it and relaunch, the bug is not there again. Interestingly, the only things in this file are about the workspace prompter. So... I tried skipping the prompter by checking "Use this as default and do not ask again", and it works!

Long story short...

The mystery: Why is the workspace prompter breaking text alignment?

The workaround: In the workspace prompt, select your workspace as usual but check "Use this as default and do not ask again". Click OK, then when Eclipse is fully started, restart.
Comment 17 Liviu Ionescu CLA 2016-09-24 04:25:42 EDT
looks like multiple small problems that are somehow related, probably a missing initialisation in the HiDPI code, triggered by another wrong or missing initialisation in the workspace prompter.
Comment 18 Phillip Webb CLA 2016-10-13 00:02:44 EDT
Possibly duplicates https://bugs.eclipse.org/bugs/show_bug.cgi?id=481144
Comment 19 Marc-André Laperle CLA 2016-10-13 10:35:27 EDT

*** This bug has been marked as a duplicate of bug 481144 ***