<AWT Dev> [8u] Review request for 8157838 Personalized Windows Font Size is not taken into account in Java8u102

Philip Race philip.race at oracle.com
Tue May 31 13:52:01 UTC 2016


So it seems probable from these that being "dpiaware" means that all 
windows versions
will behave the same for the text size.

What I don't know for sure but still suspect, is that non-dpi aware apps 
on Windows 8.1
and Win 10 will be the ones treated differently than they were on Win 7 & 8.
ie those will get the whole app scaled, not just the fonts, but as a 
result it
will be as if the fonts were 100% and then the window scaled, since that is
how windows 8.1 and later interprets this for setting non-dpi aware apps.

As you suggest there are somewhat contradictory requirements.
We want to revert the regression but also deal with the text that is
scaled disproportionately to the application. The dilemma there
though is that if we don't scale it then on a very hidpi system where
the scale is 200% they may find a different problem of too small to read
text if we don't.

Having said that .. I do note that only the Win L&F is picking up  the 
font scale.

The issues are complex enough that I think just reverting for the 
immediate upcoming
PSU is best and we then we discuss the options as to what, if anything, 
can be done in 8u.


On 5/30/16, 4:22 AM, Alexandr Scherbatiy wrote:
> On 5/28/2016 2:20 AM, Phil Race wrote:
>> -Phil.
>>> On May 27, 2016, at 2:37 PM, Alexandr Scherbatiy<alexandr.scherbatiy at oracle.com>  wrote:
>>>> On 5/28/2016 12:23 AM, Alexandr Scherbatiy wrote:
>>>> The following article claims that DPI virtualization of not DPI–aware applications is available from Windows Vista:
>>>> https://msdn.microsoft.com/en-us/library/windows/desktop/dn469266%28v=vs.85%29.aspx
>>>> I just tried to set dpiAware=false in the java.manifest file on my Windows 7 and the whole Java application was scaled.
>>>> It looks like that for platforms from Windows Windows 8 and higher the fix JDK-8076545 can be reverted because the Windows OS can automatically scale an application.
>>>       The fix JDK-8076545 needs to be reverted for Windows Vista and higher. In other case the Windows L&F font will be smaller in Java app because the fix scales it size down.
>> It will be smaller ? But isn't that the bug - that it is too small ?
>> Don't try to change the dpi aware property but provide before and after screenshots of at least win7 and win8.1 (not win 8) or later with 125% scaling.
>   [1] - Windows 7 scale 125% before the JDK-8076545 fix (original 
> large Windows font)
>      Left window - Windows L&F, right window - Metal L&F
>   [2] - Windows 8.1 scale 125 % before the JDK-8076545 fix
>   [3] - Windows 7 scale 125% after the JDK-8076545 fix (large windows 
> font is re-scaled to scale 100%)
>   [4] - Windows 8.1 scale 125% after the JDK-8076545 fix
>   [5] - screenshots with 150% scale on Windows 7 and 200% on Windows 8.1
>   [1] 
> http://cr.openjdk.java.net/~alexsch/8157838/screenshots/Windows7-125%25.png
>   [2] 
> http://cr.openjdk.java.net/~alexsch/8157838/screenshots/Windows8-125%25.png
>   [3] 
> http://cr.openjdk.java.net/~alexsch/8157838/screenshots/Windows7-125%25-rescaled-fonts.png
>   [4] 
> http://cr.openjdk.java.net/~alexsch/8157838/screenshots/Windows8-125%25-rescaled-fonts.png
>   [5] http://cr.openjdk.java.net/~alexsch/8157838/screenshots
>    There are following requirements for the Windows font scaling:
>    Windows 7 and 8.1 scale: 125% - large Windows L&F font - required 
> feature (JDK-8157838)
>    Windows 10 scale 300% - huge Windows L&F font - incorrect behavior 
> (JDK-8152980)
>   Thanks,
>   Alexandr.
>> - Phil
>>>    Thanks,
>>>    Alexandr.
>>>> For Windows XP the fix JDK-8076545 needs to be reverted to take the personalized windows font into account.
>>>> I run SwingSet2 on JDK 8u with the dpiAware=false option on Windows 7 with scale 150% and  Windows 8.1 with scale 200% and found nothing wrong with it.
>>>> As I understand, the fix JDK-6829055 Update application manifests with new Windows 7 dpiAware section
>>>> was just an improvement.
>>>> Should I remove the dpiAware option from the java.manifiest file in the current fix as well?
>>>>   Thanks,
>>>>   Alexandr.
>>>>> On 5/27/2016 9:32 PM, Phil Race wrote:
>>>>> But my point is that on Windows 8.1 the "125%" font setting is no longer a font setting as such.
>>>>> Either the *whole* app gets scaled, or *nothing* get scaled, so the user complaining about
>>>>> this bug would not have seen his request honoured in the same way as is on Windows 7.
>>>>> Or is setting dpiaware causing us to continue to get "XP Style" scaling as it is known.
>>>>> Disabling that manifest entry and reverting to using API is something we should also be considering
>>>>> but I don't know that this bug is the place to address that change which may cause more problems
>>>>> as well as fix some ..
>>>>> -phil.
>>>>>> On 05/27/2016 11:14 AM, Alexandr Scherbatiy wrote:
>>>>>>> On 5/27/2016 8:14 PM, Phil Race wrote:
>>>>>>>  From what I read on the web Windows Vista, 7, and 8, Windows uses this setting to scale just
>>>>>>> the fonts, but for 8.1 and 10 it is a whole application scale, so perhaps rather than just
>>>>>>> revert the fix, you can make it OS version dependent ?
>>>>>>   To allow the Windows OS scale a java application we need to revert the fix which sets dpiAvare=true in the java.manifest file. See JDK-8080153 Cannot disable DPI awareness.
>>>>>>   Thanks,
>>>>>>   Alexandr.
>>>>>>> Surface Pro devices are not going to be running Vista or 7 .. and I expect most are running
>>>>>>> Windows 8.1 or later by now.
>>>>>>> Of course you will need to find a way to test this hypothesis : probably on a windows 10
>>>>>>> desktop with 125% scaling to see what happens with the Win L&F.
>>>>>>> -phil.
>>>>>>>> On 05/27/2016 09:44 AM, Alexandr Scherbatiy wrote:
>>>>>>>> Hello,
>>>>>>>> Could you review the fix:
>>>>>>>>   bug:https://bugs.openjdk.java.net/browse/JDK-8157838
>>>>>>>>   webrev:http://cr.openjdk.java.net/~alexsch/8157838/webrev.00
>>>>>>>>   This is the regression from the fix JDK-8076545 in the JDK 8u.
>>>>>>>>   There was a request JDK-8152980 to backport the fix to JDK 8u because a text size is very big on Windows 10 with UI scaling set to 300% when the Windows L&F is used.
>>>>>>>>   However, this leads to another issue that a personalized Windows font size is not taken into account in Swing app with Windows L&F on JDK 8u.
>>>>>>>>   JDK 9 does not run into this issue because it contains support for HiDPI displays which reads the system DPI and scales a whole application with fonts according to system UI scale.
>>>>>>>>   The proposed solution is just to revert back the initial JDK-8076545 fix for JDK 8u only.
>>>>>>>> Thanks,
>>>>>>>> Alexandr.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20160531/f3357966/attachment-0001.html>

More information about the awt-dev mailing list