<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
Fri Jul 22 06:58:16 UTC 2016
On 22.07.2016 01:06, Sergey Bylokhov wrote:
> On 21.07.16 20:30, Semyon Sadetsky wrote:
>>> Then why PangoFonts.nativeScale is double? or it is a way to apply a
>>> generic solution in case some system will have double scales? In this
>>> case I suggest to request DefaultTransform.scaleY from the gc. In this
>>> case it will not be necessary to use X11GraphicsDevice. Related
>>> question: is this PangoFonts used in printing?
>> DefaultTransform.scaleY got any scale not only the native scale.
>> I think it is not used for printing. I doubt that the LnF is used for
>> printing.
>
> Default transform of the GraphicConfiguration for the screen should
> use only the native scale inside. And it is not necessary to validate
> the data which is returned by getDefaultTransform, because it is
> assumed that the public api return only supported data.
No. There may be debug scale. If debug scale=10 font size will be 10 less.
>
>
>>>>>> 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