From a64b49ccfcf454e7fd4e49681f1a6cb8efab8d22 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sun, 20 Apr 2025 08:00:26 +0200 Subject: [PATCH] [autofit] Request at least HarfBuzz 7.2.0 for diacritic support. (3/3) This version (from April 2023) added 'SingleSubst' support to `hb_ot_layout_lookup_get_glyph_alternates`. --- docs/CHANGES | 2 ++ src/autofit/afadjust.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/CHANGES b/docs/CHANGES index 68bbec217..5e13960a2 100644 --- a/docs/CHANGES +++ b/docs/CHANGES @@ -22,6 +22,8 @@ CHANGES BETWEEN 2.13.3 and 2.13.4 (2025-Mmm-DD) construct a proper Unicode character map from a given font to make this work. + You need HarfBuzz 7.2.0 or newer for the new diacritic support. + This was Craig White's GSoC 2023 project. diff --git a/src/autofit/afadjust.c b/src/autofit/afadjust.c index 38787fdcc..47e5495de 100644 --- a/src/autofit/afadjust.c +++ b/src/autofit/afadjust.c @@ -333,7 +333,8 @@ } -#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ +#if defined( FT_CONFIG_OPTION_USE_HARFBUZZ ) && \ + HB_VERSION_ATLEAST( 7, 2, 0 ) /* Find all glyphs that a code point could turn into from the OpenType @@ -464,7 +465,7 @@ hb_set_destroy( helper_result ); } -#endif /*FT_CONFIG_OPTION_USE_HARFBUZZ*/ +#endif /* FT_CONFIG_OPTION_USE_HARFBUZZ */ FT_LOCAL_DEF( FT_Error ) @@ -504,7 +505,8 @@ if ( FT_NEW_ARRAY( ( *map )->entries, capacity ) ) goto Exit; -#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ +#if defined( FT_CONFIG_OPTION_USE_HARFBUZZ ) && \ + HB_VERSION_ATLEAST( 7, 2, 0 ) { /* No need to check whether HarfBuzz has allocation issues; */