[OpenJDK 2D-Dev] RFR: 8221305: java/awt/FontMetrics/MaxAdvanceIsMax.java fails on MacOS + Solaris
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Sun May 3 23:11:50 UTC 2020
On 4/30/20 9:31 am, Philip Race wrote:
> This test is called MaxAdvance *is max*. My emphasis.
So there is no way to check that MaxAdvance *is max* for some predictable values? even for simple char like "W" or "A"?
> Not "all values returned by getWidths() are less than or equal to max advance.
> The latter is simply the inadequate implementation to partially test the assertion
> and which was already proving to be too much. The only way to make that test
> pass is to make changes to what max advance reports and I am saying that
> we should not do that. It would be artificial and wrong.
>
> -phil.
>
>
>
> On 4/30/20, 9:23 AM, Sergey Bylokhov wrote:
>> On 4/29/20 3:58 pm, Philip Race wrote:
>>> the advance of 'm' is a commonly used proxy for the design width of a latin font.
>>> But I agree it is also not really a great estimate once you consider any international text.
>>>
>>> Anyway I am not sure where you are headed with that and the
>>> discussion of charWidth() or charWidths().
>>>
>>> I am not trying to "fix the world" here, I am just removing a test
>>> that it is pointless to maintain.
>>
>> Then probably we can report a bug, to state that we have some issues here?
>> From my point of view, the test is mostly fine, it does not check some
>> real corner cases and compound glyphs but only the simple chars, which should
>> work. If it does not work means all code where we try to predict the size of
>> the text components is broken, and it looks like there is no way to fix that.
>>
>>
--
Best regards, Sergey.
More information about the 2d-dev
mailing list