<Swing Dev> RFR: 8231286: HTML font size too large with high-DPI scaling and W3C_LENGTH_UNITS [v4]
Matthias Perktold
github.com+7334069+mperktold at openjdk.java.net
Tue Feb 2 08:27:48 UTC 2021
On Mon, 1 Feb 2021 18:15:13 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
> It is likely because sun.java2d.uiScale gets applied to both frames. If the font size is the same, 2d surface gets scaled up to the same level, which results in the same size of the frames.
>
> Yet the calculations of the conversion ratios in CSS depend only on the resolution of the main screen. If the main screen resolution is 96dpi (100% scaling), the font size will be the same as after your fix.
That makes sense.
What should we do about it? Is there a way to inject a different screen resolution for testing?
And should I remove `sun.java2d.uiScale` from the doc?
-------------
PR: https://git.openjdk.java.net/jdk/pull/2256
More information about the swing-dev
mailing list