css 'font:menu' uses a wrong scaled font-size on hi-dpi systems (Windows)
Reported by
m...@krpano.com,
Jul 28 2016
|
||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0 Example URL: http://krpano.com/chrome/bugs/hidpi/css-font-menu-bug.html Steps to reproduce the problem: Test this page on a hi-dpi Windows system: http://krpano.com/chrome/bugs/hidpi/css-font-menu-bug.html (see also the source of that page, it's pretty simple) What is the expected behavior? The same relative font-size as when using 100% dpi. Firefox is correct - see the attached screenshots. What went wrong? The font=menu font-size is wrong. And the button font/size is also wrong. It seems internally the font-size itself also gets scaled by the DPI-scale, but that's unnecessary and wrong - the page itself already will be scaled, so there is double-scale now. Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? N/A Chrome version: 52 Channel: n/a OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: Tested only on Windows. Firefox is correct. Edge is also broken (will report too).
,
Jul 29 2016
The screenshots above are from Windows 10 PC with basically only one 4k monitor attached (and an HTC Vive, but I don't know if that counts internally as monitor), but I'm getting the same problem also on a 4k laptop with definitively no monitor attached. What were your Windows DPI settings during testing?
,
Jul 29 2016
As additional note - on a default Windows 10 system the font-size for font=menu should be always 12px, regardless of the DPI settings. At the moment that font-size gets (wrongly) scaled by the DPI scale in Chrome, e.g. DPI = 100% => font-size:12px DPI = 150% => font-size:18px DPI = 200% => font-size:24px DPI = 300% => font-size:36px
,
Jul 29 2016
One more idea - depending on how Chrome gets the system font sizes - it could be also that the system itself is reporting the scaled font-sizes... In this case Chrome would need to scale them back...
,
Aug 3 2016
,
Aug 11 2016
Thank you for providing more feedback. Adding requester "kojii@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 11 2016
Why is this bug still unconfirmed? It's pretty easy to reproduce - just use a Windows system with a non 100% DPI setting and view the test link...
,
Aug 12 2016
Sorry I forgot to add myself as cc, missed your replies. Could you try on the latest Canary? We have hi-dpi fixes a few days ago, and I can no longer reproduce this. Note, I don't have hi-dpi monitor right now, but tested by changing DPI on Win 10.
,
Aug 13 2016
Hi, I'm testing this with Chrome Version 54.0.2827.0 canary (64-bit) now - and the bug is still there (no difference at all). Btw - see also the attached screenshot - it's was made in Canary during tying this text and it shows another DPI problem - the font size in this comment field here is also wrong (my system: Windows 10, 300% DPI).
,
Aug 20 2016
Thank you for providing more feedback. Adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 22 2016
Is there someone who can confirm this? It does not reproduce on Win10 hi-dpi, probably this is win7 only issue but I don't have win7.
,
Aug 22 2016
All screenshots from above are showing Win10! That means the bug is on Win10, not sure about Win7. The info 'OS Version: 6.1 (Windows 7' in the first post is wrong - the bug-report was written on a Win7 system, but the tests were done on Win10). About not being able to reproduce - how do you test? I would recommend setting the Windows DPI scale to a high value (e.g. 300% like in the screenshots) to make the problem more clear and then compare this page: http://krpano.com/chrome/bugs/hidpi/css-font-menu-bug.html between Chrome and Firefox (Firefox is rendering correctly). And please post a screenshot from your system about that test case. It would be very strange when it wouldn't be affected...
,
Aug 22 2016
Confirmed on windows 10 high DPI on both stable and canary. Oshima, could this be due to your scaling changes?
,
Aug 23 2016
My screenshot in case this helps analysis
,
Aug 23 2016
@kojii - your screenshot is even more strange - it say font-family=Segoe UI, but the font on the page is rendered with something that looks like 'Times New Roman'... Could this maybe be related somehow to multiple monitors? What's the DPI setting on the other ones? In my tests (with one desktop and one tablet system) always only one monitor was attached.
,
Aug 29 2016
Able to reproduce the issue on win10 chrome version 52.0.2743.116 and 55.0.2843.0 - observed font-size vary with high DPI. DPI = 200% => font-size:24px Working fine with firefox browser Please find the screenshots for chrome and firefox browsers This is a non regression issue existing since M45 builds 45.0.2454.99 to latest canary
,
Aug 30 2016
Issue can be seen from M41 (41.0.2272.40) builds to latest canary. The prior builds doesnt display anything under font-family and font-size as shown in the screenshot
,
Aug 30 2016
Just as note - the MS Edge browser has the same (or at least a similar) problem as Chrome. So the problem might be the Windows API for getting the font-size. That means the font-size might be already scaled and Chrome would need to 'scale-back' by the DPI scale to get the correct size...
,
Sep 1 2016
Works fine on chromeos, so this is probably windows specific (as mentioned in -#18). bsep@ can you look into this?
,
Sep 1 2016
I'll look into this when I have time.
,
Sep 20 2016
Reassigning to someone who knows more about fonts.
,
Sep 20 2016
,
Oct 14 2016
When I debugged this, I noticed that it was getting the menu font size from preferences in RenderViewImpl::UpdateFontRenderingFromRendererPrefs, when it calls blink::WebFontRendering::setMenuFontMetrics. At that point, it is already getting the scaled font size. The fix might be as simple as un-scaling prefs.menu_font_height before handing it to blink. I haven't yet reviewed what else uses that pref, but if it's only used for blink::WebFontRendering::setMenuFontMetrics it probably makes more sense to just store that pref as an un-scaled value. I haven't yet tracked down where that pref is being set.
,
Sep 8 2017
The *button* font now gets the correct size but the menu font is still wrong.
,
Aug 1
|
||||||||||||||
►
Sign in to add a comment |
||||||||||||||
Comment 1 by kojii@chromium.org
, Jul 29 2016