[OpenJDK 2D-Dev] RFR: 8233097: Fontmetrics for large Fonts has zero width
philip.race at oracle.com
Wed Oct 30 18:37:47 UTC 2019
PS .. a positive from this is that with this fix the regression test
runs about 10X faster than it did with say JDK 13 GA .. due to
skipping the redundant images
On 10/30/19 11:05 AM, Phil Race wrote:
> Bug: https://bugs.openjdk.java.net/browse/JDK-8233097
> Webrev: http://cr.openjdk.java.net/~prr/8233097/
> This bug is a regression from a fix in JDK 13.0.1 / 11.0.5
> To work around a bug in old versions of freetype we capped the size
> of the glyph image but overlooked that we may use that code to get
> metrics even when the glyph image isn't needed.
> The fix is to still get the metrics the same way but in such a case
> skip getting the image.
> When the new "renderImage" variable is true the changes in the
> code should be a no-op, and this is used for metrics and images
> for typical sizes. So theoretically at least, safe there.
> For renderImage == false, as used from the advance/metrics functions
> it guards against rendering the image or accessing bitmap fields.
> The advance/metrics cases discard the image so it should also be safe
> I'm running regression tests as well as Font2DTest and all passes so far.
> This will need to be backported to 11u, so does still need careful
More information about the 2d-dev