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

2020-04-24 Thread Philip Race
Updated webrev : http://cr.openjdk.java.net/~prr/8230672.1/ And CSR for review : https://bugs.openjdk.java.net/browse/JDK-8243566 -phil On 4/24/20, 3:00 AM, Sergey Bylokhov wrote: On 4/23/20 10:00 am, Philip Race wrote: I am not 100% sure what you are getting at, but maybe "render each such ch

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

2020-04-24 Thread Sergey Bylokhov
On 4/23/20 10:00 am, Philip Race wrote: I am not 100% sure what you are getting at, but maybe "render each such character" could be rephrased as "query the advance of each such character". But I would not point to charWidth() for this because it is not adequate for all code points. Does that cl

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

2020-04-23 Thread Philip Race
I am not 100% sure what you are getting at, but maybe "render each such character" could be rephrased as "query the advance of each such character". But I would not point to charWidth() for this because it is not adequate for all code points. Does that clear it up ? -phil. On 4/23/20, 9:49 AM,

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

2020-04-23 Thread Sergey Bylokhov
On 4/23/20 9:34 am, Philip Race wrote: No, I don't see the relationship. charWidth() is accurate if you use the FontMetrics from the render context. If it is always accurate why it is not recommended in the new documentation? Why we suggest to "render each such character". 299 * None o

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

2020-04-23 Thread Philip Race
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 t

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

2020-04-23 Thread Sergey Bylokhov
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

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

2020-04-23 Thread Mario Torre
It seems good to me. I also like that you mention actual examples, it will make life a bit easier when trying to understand why things don't seem to work as expected, so the actual text works for me, there's a couple of places where you have double spaces that you may want to fix, for example a "ch

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

2020-04-22 Thread Philip Race
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