From 3f26822eeda113dac15588222f0a5c7b2920fc35 Mon Sep 17 00:00:00 2001 From: Jehan Date: Fri, 2 Jan 2026 14:05:08 +0100 Subject: [PATCH] Issue #12736: dialogs have odd kerning (related to harfbuzz). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to René de Hesselle for figuring out that the issue happens when Harfbuzz is not built with libgraphite2. As far as we know, this is a macOS-only issue. The issue has already been fixed in our macOS packages, but just to make sure this doesn't reappear, let's add a configure test. Note: when we'll bump to using meson >= 1.5.0, we can use option `required: platform_osx` of cc.run(). --- meson.build | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/meson.build b/meson.build index ce6bf45d8c..7e6ef0aadb 100644 --- a/meson.build +++ b/meson.build @@ -494,6 +494,30 @@ add_project_arguments('-DGDK_VERSION_MAX_ALLOWED=' + gtk_min_macro, language: 'c harfbuzz_minver = '2.8.2' harfbuzz = dependency('harfbuzz', version: '>='+harfbuzz_minver) + +if platform_osx and \ + cc.run(''' + #include + #include + + int + main (int argc, char **argv) + { + const char **shapers = hb_shape_list_shapers (); + + for (int i = 0; shapers[i] != NULL; i++) + if (strcmp (shapers[i], "graphite2") == 0) + return 0; + + return 1; + } + ''', + name: 'harfbuzz is built with graphite2 shaper', + dependencies: harfbuzz).returncode() != 0 + error('harfbuzz must be built with graphite2 shaper on macOS.') +endif + + json_glib_minver = '1.2.6' json_glib = dependency('json-glib-1.0', version: '>='+json_glib_minver) lcms_minver = '2.8'