<Swing Dev> RFR: 8257664: HTMLEditorKit: Wrong CSS relative font sizes [v5]

Alexey Ivanov aivanov at openjdk.java.net
Mon Jan 18 12:26:44 UTC 2021


On Mon, 18 Jan 2021 12:11:33 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> Stanimir Stamenkov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fixup! 8257664: Fix font-size inheritance with percentage values
>>   
>>   Declare fontSizeInherit() accessor private.
>
> Looks good to me. Internal testing is also ok. 
> However, I have one question, html text is honouring "font-size" value(say 1.5 as per testcase) but if Display resolution in windows system setting or via -Dsun.java2d.uiScale is set to something different(say 1.25), then should it honour the font-size property (1.5) or Display resolution (1.25)?

Shouldn't UI scaling be applied automatically? The font size in user space should remain the same, yet the actual font size would be scaled up according to the DPI setting. That is in my understanding, CSS rule applies 150% to the base font size according to its rules; then `uiScale` is applied to whatever the computed font size is.

Does it make sense to run the test with different `uiScale` explicitly?
I ran the test on my laptop with 150% scaling, it passed successfully.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1759


More information about the swing-dev mailing list