Hi, Phil. I guess the old code used TextLayout because the check above is "false": boolean simple = values == null || (values.getKerning() == 0 && values.getLigatures() == 0 && values.getBaselineTransform() == null);
Is it possible that for the font which use attributes/kerning/ligatures the height calculated via TextLayout and FontDesignMetrics.getSimpleBounds() will be different? BTW what about the comment for this block: // this code should be in textlayout // quick check for simple text, assume GV ok to use if simple On 5/18/20 5:07 pm, Philip Race wrote:
bug : https://bugs.openjdk.java.net/browse/JDK-8245159 webrev: http://cr.openjdk.java.net/~prr/8245159/ TextLayout does not like being constructed with an empty string, so when we accept a string from the application and use it in creating a TextLayout we need to be check. I looked around for other cases that may be missing a check but did not spot any. -phil.
-- Best regards, Sergey.