[OpenJDK 2D-Dev] RFR: 8230672: Spec. for FontMetrics.getMaxAdvance is too prescriptive.

Philip Race philip.race at oracle.com
Thu Apr 23 16:34:25 UTC 2020


No, I don't see the relationship.

charWidth() is accurate if you use the FontMetrics from the render context.

-phil.

On 4/23/20, 9:19 AM, Sergey Bylokhov wrote:
> Hi, Phil.
>
> Isn't all/some of the new text in getMaxAdvance() is also applicable 
> to charWidth()?
> If I read the current doc properly then it looks like the charWidth() 
> should return "advance"
> of some specific "advance", and getMaxAdvance() is "just" maximum 
> value of any possible
> results from the charWidth().
>
> On 4/22/20 12:49 pm, Philip Race wrote:
>> bug : https://bugs.openjdk.java.net/browse/JDK-8230672
>> webrev : http://cr.openjdk.java.net/~prr/8230672/
>>
>> Loosen up the spec. a lot to reflect reality.
>>
>> I considered deprecating the method but there isn't any easy 
>> replacement,
>> so it would just be annoying to old code.
>>
>> This will clearly need a CSR which I will draft once we agree on the 
>> text here.
>>
>> -phil.
>
>


More information about the 2d-dev mailing list