<Swing Dev> [9] Review request for 8058742: Text size is twice bigger under GTK L&F on Gnome with HiDPI enabled

Semyon Sadetsky semyon.sadetsky at oracle.com
Tue Jul 26 19:05:37 UTC 2016



On 26.07.2016 21:42, Sergey Bylokhov wrote:
> On 26.07.16 21:25, Semyon Sadetsky wrote:
>>> Why it should be decreased? it should work as other components. But we
>>> should use only one source of system scale information at a time. And
>>> debug scale should have the main priority. Xft.dpi should affect jdk
>>> in the same way as "text-scale-factor, text-scaling-factor".
>> Please look at the code the fix is applied to. Native scale is in the
>> divider.
>
> Because we take care about scale twice, the first time as a global 
> scale and the second time here. We should do this only in one place.
Our global solution is not full yet. non-integer scale is not supported. 
Also it does not work for all WMs/DEs.
>
>> This fix is not related to the whole jdk scale it is only about GTK font
>> size. Taking Xft.dpi as a global jdk scale (not in this fix, of 
>> cause) would
>> require an additional investigation. But the supported OSes provide
>> refined scale info from xsettings.
>
> It is actually directly related to the global scale, since support of 
> Xft/ was added in JDK-4830281 as a way to scale java UI. And now the 
> new solution and the old one conflicts. Can we skip the usage of 
> gnome.Xft if default device scale is not identity (which means that 
> some other scale factor is used)?
Do you mean if native scale > 1 then to use scale=1 for GTK font size? 
That will give the same result I guess.
>
>>>>>>> I think the logic should be:
>>>>>>>  - Take debug scale into account if it was set and skip all others.
>>>>>>>  - Check J2D_UISCALE
>>>>>>>  - Check scale-factor, text-scale-factor, text-scaling-factor.
>>>>>>>  - Check Xft.dpi.
>>>>>>>  - If non of them was set then scale=1 should be used.
>




More information about the swing-dev mailing list