[OpenJDK 2D-Dev] [11u] java/awt/FontMetrics/MaxAdvanceIsMax.java test failure (was: [11u] RFR 8210782: Upgrade HarfBuzz to the latest 2.3.1)

Andrew John Hughes gnu.andrew at redhat.com
Wed May 15 21:52:11 UTC 2019

On 14/05/2019 17:41, Martin Balao wrote:
> Hi Goetz,
> On 5/13/19 1:38 PM, Lindenmaier, Goetz wrote:
>> Can I somehow verify that it's the font that has the problem?
>> Can I fix the font so that the test passes?
> I cannot say whether or not the static max advance value in each font is
> right or not, but let's assume it is. The underlying problem here is
> that OpenJDK uses a couple of internal FreeType library values to
> calculate the effects of algorithmic bold and italic in the max advance
> value -"algorithmic" means that the font is not italic or bold and is up
> to the rendering engine to generate the desired effect-. These values
> have changed over the years. What we did in 8218854 [1] was updating the
> italic value to the latest version and supporting bold in the
> calculation. Ideally, OpenJDK should not be tight to these values.
> However, that's not easy to get rid of unless we change the API or the
> API semantics. All this means that if you use OpenJDK 11 with an old
> Free Type library, you may have different values and the test may fail.
> Note: this is just an hypothesis, I couldn't reproduce on my own.
> I believe the test assertion is right if we consider API semantics only
> but we can put some constraints given reality.
> Kind regards,
> Martin.-
> --
> [1] - http://hg.openjdk.java.net/jdk/jdk/rev/0804f29e8be7

I think the important thing here is to ensure that the test passes with
the FreeType library included in the OpenJDK sources
(--with-freetype=system). It's unrealistic to test with every possible
version of FreeType one could compile against.
Andrew :)

Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.java.net/pipermail/2d-dev/attachments/20190515/e9442aaf/signature.asc>

More information about the 2d-dev mailing list