<AWT Dev> [OpenJDK 2D-Dev]  Review request for 8076545 Text size is twice bigger under Windows L&F on Win 8.1 with HiDPI display
philip.race at oracle.com
Mon Nov 16 20:51:31 UTC 2015
That seems better. But one more question to get a point clarified.
You are using getDesktopWindow() which is for the primary monitor.
I assume that the 'inversion' results in the value being used to be
of the monitor in a multi-mon situation and so when we move to a 2nd monitor
that inverted size remains valid ?
If so looks good to me.
On 11/16/2015 06:07 AM, Alexander Scherbatiy wrote:
> Could you review the updated fix:
> - round is used instead of ceil
> - inverted scales are used
> On 10/30/2015 10:40 PM, Jim Graham wrote:
>> In this case round may be better. ceil() is more for cases where you
>> needed "at least X amount of room", but I don't think a font size is
>> an "at least this much" kind of case.
>> Also, I've been toying with the idea that use of ceil() and floor()
>> in any DPI-adjustment equations should really be "ceil(val -
>> epsilon)" or "floor(ceil + epsilon)" for some small value of epsilon
>> chosen just large enough to prevent various round-off errors from
>> affecting the outcome. One idea is for 1/256 as the value of epsilon
>> since that could equate to the smallest measurable difference in
>> terms of alpha or interpolation results (or 1/512 for "half the
>> smallest quantum")...
>> On 10/29/15 1:36 PM, Phil Race wrote:
>>> size->cx = (int)ceil(size->cx / scale);
>>> So if size->cx / scale works out to be 12.0001 you will round it up
>>> to 13?
>>> Can you check what pixel size windows gives you in such a case ?
>>> I'd be a little surprised if they did that rather than round.
>>> Is the SetFontProperty that does not accept a scale parameter still
>>> somewhere ?
>>> On 10/29/2015 04:53 AM, Sergey Bylokhov wrote:
>>>> On 17.07.15 16:27, Alexander Scherbatiy wrote:
>>>>>> - Sergey's point about multi-mon should be checked out.
>>>>> Windows 8.1 has option "Let me choose one scaling level for
>>>>> all my
>>>>> If I unset it I am able to change the size of all items.
>>>>> the DPI which returns GetDPIForMonitor is still 2 on HiDPI displays.
>>>> This version looks fine, but I am sure it can be double checked on
>>>> windows 10 at some moment as well.
More information about the awt-dev