RFR: 8373290: Update FreeType to 2.14.1

Phil Race prr at openjdk.org
Sat Feb 28 22:00:20 UTC 2026


On Fri, 27 Feb 2026 11:01:51 GMT, Jayathirth D V <jdv at openjdk.org> wrote:

> Update FreeType used for font rendering to latest 2.14.1 version.
> 
> Newly added files in upstream without which our build fails, so including them:
> src/java.desktop/share/native/libfreetype/src/autofit/afadjust.c
> src/java.desktop/share/native/libfreetype/src/autofit/afadjust.h
> 
> Below files were present in 2.13.2 upstream but our build worked fine without them. But with FreeType 2.14.1 our build fails without these files, so added them also:
> src/java.desktop/share/native/libfreetype/src/autofit/ft-hb.c
> src/java.desktop/share/native/libfreetype/src/autofit/ft-hb.h
> 
> Below files should have been removed in 2.13.2 update itself as they were removed from upstream. So deleted them now:
> src/java.desktop/share/native/libfreetype/src/truetype/ttsubpix.c
> src/java.desktop/share/native/libfreetype/src/truetype/ttsubpix.h
> 
> With this FreeType 2.14.1 update we saw [JDK-8378623](https://bugs.openjdk.org/browse/JDK-8378623) test issue which is already resolved.
> 
> While CI testing one more test(javax/swing/text/html/CSS/8231286/HtmlFontSizeTest.java) failure was observed only on Oracle Linux 10. After FreeType update the ratio of width calculated in this test is "1.3757962" in our Oracle Linux 10 machines and it is rounding off to "1.4" and not the "1.3" value as expected in this test. Taking the average ratio out of both width and height for a larger font will give result in values near to the ideal "1.3" ratio. After making this test more robust it passes on all versions of all platforms in our CI. javax/swing/text/html/CSS/8231286/HtmlFontSizeTest.java update is also included in this PR.
> 
> After above test updates, overall testing is green with FreeType 2.14.1 update.

src/java.desktop/share/native/libfreetype/include/freetype/config/ftoption.h line 293:

> 291:    *   here with the configured one.
> 292:    */
> 293: /* #define FT_CONFIG_OPTION_USE_HARFBUZZ */

You have the define of FT_CONFIG_OPTION_USE_HARFBUZZ  still commented out (correct)

src/java.desktop/share/native/libfreetype/src/autofit/ft-hb.h line 28:

> 26: FT_BEGIN_HEADER
> 27: 
> 28: #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ

And this file is only included if it is defined ... so you aren't using it. So this does not add up

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29954#discussion_r2867938847
PR Review Comment: https://git.openjdk.org/jdk/pull/29954#discussion_r2867940851


More information about the client-libs-dev mailing list