Integrated: 8378623: Use unique font names in FormatCharAdvanceTest
Jayathirth D V
jdv at openjdk.org
Thu Feb 26 05:52:16 UTC 2026
On Wed, 25 Feb 2026 05:36:25 GMT, Jayathirth D V <jdv at openjdk.org> wrote:
> While working on [JDK-8373290](https://bugs.openjdk.org/browse/JDK-8373290), it is noticed that with FreeType update java/awt/font/TextLayout/FormatCharAdvanceTest.java is failing.
>
> On more analysis it is found that this Test is not using appropriate FontMetrics under FontMetrics.stringWidth() and Font.getStringBounds("AB", frc) code path. Test continues to use Type1 FontMetrics for TTF font.
>
> Freetype update just revealed this issue as "width" slightly changes between the Type1 and TTF font used in this test(This is happening because of hinting/rounding change in FreeType update). We are not seeing any change of Metrics for other Physical(Helvetica.ttf) or Logical(Dialog) fonts.
>
> We have separate bug [JDK-8378622](https://bugs.openjdk.org/browse/JDK-8378622) to analyse and fix FontMetrics caching issue. We are updating FormatCharAdvanceTest to use unique "font name" for both Type1 and TTF font to pick valid FontMetrics and make this test work properly. Changing the font name will not affect the purpose of this test.
This pull request has now been integrated.
Changeset: d7c8000a
Author: Jayathirth D V <jdv at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/d7c8000a493e58c677fed2e04678bb56e70dffc4
Stats: 19 lines in 1 file changed: 5 ins; 0 del; 14 mod
8378623: Use unique font names in FormatCharAdvanceTest
Reviewed-by: psadhukhan
-------------
PR: https://git.openjdk.org/jdk/pull/29910
More information about the client-libs-dev
mailing list