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

Bug 493667

Summary: [HiDPI] Help infocenter has a font scaling problem in IE at 200%
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: User AssistanceAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, d.gabriel, daniel_megert, develop, eclipse, gongmd, justin, karl, ldubox-coding101, loskutov, niraj.modi, peter, wim.jongman
Version: 4.6Flags: akurtakov: pmc_approved+
Target Milestone: 4.19 RC2   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/c/platform/eclipse.platform.ua/+/170371
https://git.eclipse.org/c/platform/eclipse.platform.ua.git/commit/?id=25d529a89bee8edb82d38a3ec98a6df2ef5a91f2
Whiteboard:
Attachments:
Description Flags
Screenshot
none
Infocenter on Eclipse 4.7
none
Screenshot before the change, to show where to look none

Description Markus Keller CLA 2016-05-13 12:18:10 EDT
Created attachment 261731 [details]
Screenshot

Mars and Neon (4.6.0.I20160512-1000)

The Eclipse help infocenter has a font scaling problem in IE 11 on Windows 7 at 200% resolution (Control Panel > Display > Set custom text size (DPI) > 200%).

Most text in the trim and in the TOC tree is way too big. The actual help content looks fine.

This affects the infocenter at http://help.eclipse.org/mars/index.jsp as well as the embedded infocenter inside Eclipse. The latter additionally suffers from an image scaling problem, see bug 493666.
Comment 1 Peter Severin CLA 2017-10-13 11:01:05 EDT
Created attachment 270990 [details]
Infocenter on Eclipse 4.7

Integrated help look pretty bad on Eclipse 4.7. Along with the font problem in the TOC, there are other issues with icons, toolbars and search toolbar.
Comment 2 Luke Usherwood CLA 2018-05-07 16:21:00 EDT
200%? Meh, that's at least readable. Try 250%! (Dell XPS) ;-)

HiDPI's lots of fun huh? I've been dealing with it a lot too (in Swing). (Ever since getting this laptop, funnily enough...)
Comment 3 Dani Megert CLA 2019-12-05 05:14:53 EST
*** Bug 527465 has been marked as a duplicate of this bug. ***
Comment 4 Dani Megert CLA 2019-12-05 05:15:40 EST
*** Bug 553654 has been marked as a duplicate of this bug. ***
Comment 5 Dani Megert CLA 2019-12-05 05:16:07 EST
*** Bug 498094 has been marked as a duplicate of this bug. ***
Comment 6 Eclipse Genie CLA 2020-10-06 10:11:49 EDT
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.ua/+/170371
Comment 7 Holger Voormann CLA 2020-10-06 10:37:40 EDT
(In reply to Eclipse Genie from comment #6)
> New Gerrit change created:
> https://git.eclipse.org/r/c/platform/eclipse.platform.ua/+/170371

Problem:

The Microsoft Internet Explorer (and probably also legacy non Chromium
based Microsoft Edge versions) does scale system fonts (for instance
"font: icon") much too large on high-DPI displays, if no font size is
specified. This affects the Eclipse embedded help on Windows, since on
Windows the browser widget currently uses the Internet Explorer by
default.

In addition, "font: icon" without a font size affects also the
Infocenter since different browsers display it in different sizes. On
Windows 10, on my computer "font: icon;" without a font size is
displayed in Chrome and Edge in the font size 16px, on the same computer
it is displayed in IE and Firefox in 12px by default. Firefox and IE use
the system font used to label icons, but in Chrome changing the system
icon font does not change the font in the browser (note, in Windows 10
the UI to change the icon font and other fonts has been removed, so only
the general font size can be set without editing the registry). On the
iPad the font size seems to be 14px and on an Android smartphone it
seems to be 16px (Chrome) and 12px (Firefox).

The original idea to use "font: icon" without a font size to get as
close to the system look as possible does not seem to work anymore due
to the mentioned IE bug on high-DPI displays and the lack of support of
it in Chrome (including Microsoft Edge).


Solution:

As a compromise, add "0.875 rem" everywhere where "font: icon" and
"font: message-box" is used, which is 14px, as long as the default text
size of the web browser of 16px is not changed. This will change the
font size in most cases, but in each of these cases only a little bit
(either +2px or -2px).


Related, but not a CSS issue: bug 567640
Comment 8 Wim Jongman CLA 2020-10-19 10:05:50 EDT
I like this patch but I can't test on all platforms. 

+1 for committing and making it available to us with the next build. It is easy enough to revert in case of severe issues.
Comment 9 Andrey Loskutov CLA 2020-10-19 10:25:32 EDT
(In reply to Holger Voormann from comment #7)
> As a compromise, add "0.875 rem" everywhere where "font: icon" and
> "font: message-box" is used, which is 14px, as long as the default text
> size of the web browser of 16px is not changed. This will change the
> font size in most cases, but in each of these cases only a little bit
> (either +2px or -2px).

Please provide concrete steps to verify the solution. I don't see immediately any change (I have no HiDPI on Linux), but also I have no idea where to look for it.

(In reply to Wim Jongman from comment #8)
> I like this patch but I can't test on all platforms. 

On which platform / browser / DPI have you tested?

> +1 for committing and making it available to us with the next build. It is
> easy enough to revert in case of severe issues.

I can't test on HiDPI on Linux, but it would be nice if someone would, same for Mac/Windows for both normal/HiDPI monitors. It is better to test basic scenario first before reverting & creating M3a or RC2b packages at very last minute before release.
Comment 10 Holger Voormann CLA 2020-10-19 12:47:50 EDT
Created attachment 284513 [details]
Screenshot before the change, to show where to look

(In reply to Andrey Loskutov from comment #9)
> ...
> Please provide concrete steps to verify the solution. I don't see
> immediately any change (I have no HiDPI on Linux), but also I have no idea
> where to look for it.
> 

Please check the places where on Windows fonts were previously displayed too large (see attached screenshot):
- Search bar: "Search:" label, input field, "Go" button, "Scope:" link
- Tab (side bar) titles, e.g. "Contents"
- Drop-down menus of the print and search buttons
- TOC items
- Breadcrumb that is shown inside of the topic

For me it looks good on Windows 10 on high-DPI and non-high-DPI displays in Internet Explorer, Edge, Firefox and Chrome. Also on the iPad (Safari, Chrome and Firefox) and on a Motorola Android smartphone (Chrome and Firefox) I did not notice anything that was broken by this change.
Comment 11 Wim Jongman CLA 2020-10-20 07:00:27 EDT
(In reply to Andrey Loskutov from comment #9)

> 
> > +1 for committing and making it available to us with the next build. It is
> > easy enough to revert in case of severe issues.
> 
> scenario first before reverting & creating M3a or RC2b packages at very last
> minute before release.

What I meant is, if we accept now, everyone running on I-Builds will have it tomorrow. I assume all committers and many contributors are running their IDE on I-Builds.

Maybe the quickest way to have more eyes on this. M3 is only November 27, no need for M3a.

I'm fine either way, it just is a low risk patch.
Comment 12 Holger Voormann CLA 2020-11-26 03:49:21 EST
The fix for this bug has now been tested on all platforms (Windows, Linux and macOS plus for the Infocenter on iOS and on Android):
https://git.eclipse.org/r/c/platform/eclipse.platform.ua/+/170371

Would it be possible to get it accepted for 4.18 (RC1)?

Windows is a widely used platform and high-DPI displays are becoming more and more common. Without the fix "Help > Help Contents" is almost unreadable on Windows on a high-DPI display.
Comment 13 Alexander Kurtakov CLA 2020-11-26 06:52:02 EST
As it's IE specific Niraj would you please review and consider whether it's worth adding it for RC2?
Comment 14 Alexander Kurtakov CLA 2020-11-30 11:47:10 EST
I don't see any negative impact on my Fedora 33 non hidpi system.
Comment 16 Niraj Modi CLA 2021-03-08 10:01:49 EST
(In reply to Alexander Kurtakov from comment #14)
> I don't see any negative impact on my Fedora 33 non hidpi system.

For me, "Help >> Help Contents" is readable with and without the patch.
- As tested on Win10 with IE11 @200 zoom:

Also I don't see any negative impact of this patch, so should be good on this.

Can we close this bug for 4.19 and create new bugs to track pending items(if any)?
Thanks!