[OpenJDK 2D-Dev] RFR: 8221305: java/awt/FontMetrics/MaxAdvanceIsMax.java fails on MacOS + Solaris

Philip Race philip.race at oracle.com
Thu Apr 30 16:31:25 UTC 2020


This test is called MaxAdvance *is max*. My emphasis.
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.
>
>


More information about the 2d-dev mailing list