<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
Mon Jul 25 17:56:43 UTC 2016
On 7/25/2016 8:47 PM, Sergey Bylokhov wrote:
> On 25.07.16 18:57, Semyon Sadetsky wrote:
>>> If debug scale was set by the user and everything was scaled
>>> accordingly then why this font should not do the same? My
>>> understanding is that debug scale is a kind of emulation of some
>>> non-standart DPI for some the platform.
>> because PangoFont ignores debug scale if Xft/DPI is set.
>
> The question is why it ignores debug scale but takes into account the
> native scale(debug scale is a hook which should allow us to easily
> change the native scale). In this case all elements/fonts/etc will be
> scaled using debug scale and this font will not, it looks inconsistent.
But the font doesn't need to be scaled if JDK supports scale already.
Before the scale support is added to JDK the native scale was supported
for GTK LnF only and using fonts size only. I kept this simplified scale
support for compatibility with Linux OSes for which native scale is not
supported. For Qt based WMs for example.
>
>>>
>>>>>>>>>> On 2 1.07.2016 13:13, Sergey Bylokhov wrote:
>>>>>>>>>>> Is it intended to skip scales less than 1?
>>>>>>>>>>>
>>>>>>>>>>> On 07.07.16 10:01, Alexandr Scherbatiy wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> The fix looks good to me.
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks,
>>>>>>>>>>>> Alexandr.
>>>>>>>>>>>>
>>>>>>>>>>>> On 7/6/2016 10:03 PM, Semyon Sadetsky wrote:
>>>>>>>>>>>>> On 7/6/2016 6:03 PM, Alexandr Scherbatiy wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> On 7/6/2016 4:13 PM, Semyon Sadetsky wrote:
>>>>>>>>>>>>>>> Hello,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Please review fix for JDK9:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> bug: https://bugs.openjdk.java.net/browse/JDK-8058742
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> webrev:
>>>>>>>>>>>>>>> http://cr.openjdk.java.net/~ssadetsky/8058742/webrev.00/
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> - PangoFonts class is placed in the shared space and it
>>>>>>>>>>>>>> uses
>>>>>>>>>>>>>> the
>>>>>>>>>>>>>> X11GraphicsDevice from the unix space. Could there be
>>>>>>>>>>>>>> problems
>>>>>>>>>>>>>> with
>>>>>>>>>>>>>> build compilation on platforms differ from Unix?
>>>>>>>>>>>>> no it doesn't cause compilations problems. PangoFonts is
>>>>>>>>>>>>> used on
>>>>>>>>>>>>> Linux
>>>>>>>>>>>>> platform only.
>>>>>>>>>>>>>> - It is better to rename the scale field to nativeScale
>>>>>>>>>>>>>> just to
>>>>>>>>>>>>>> not
>>>>>>>>>>>>>> mix it with other scale types
>>>>>>>>>>>>> ok. webrev is updated:
>>>>>>>>>>>>> http://cr.openjdk.java.net/~ssadetsky/8058742/webrev.01/
>>>>>>>>>>>>>> - Does the test
>>>>>>>>>>>>>> test/java/awt/font/FontScaling/FontScalingTest.java fails
>>>>>>>>>>>>>> without
>>>>>>>>>>>>>> the proposed fix on Linux?
>>>>>>>>>>>>> Yes it fails before and passes after the fix.
>>>>>>>>>>>>>
>>>>>>>>>>>>> --Semyon
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>> Alexandr.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> After adding hdpi support to JDK the GTK LnF fonts are
>>>>>>>>>>>>>>> scaled
>>>>>>>>>>>>>>> twice
>>>>>>>>>>>>>>> using the JDK UI scale factor and the native scale factor
>>>>>>>>>>>>>>> derived
>>>>>>>>>>>>>>> from the screen dpi setting. The fix removes the native
>>>>>>>>>>>>>>> scale
>>>>>>>>>>>>>>> if it
>>>>>>>>>>>>>>> is already taken into account in the JDK UI scale.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --Semyon
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>
>
More information about the swing-dev
mailing list