From 2a06b85d4e942587083b3f44e2127555233aa74d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 4 Mar 2025 02:10:21 -0700 Subject: [PATCH] [fontations] Try using an intermediate library Still doesn't link. --- src/fontations/lib.rs | 2 +- src/hb-fontations.cc | 9 +++++++++ src/meson.build | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 src/hb-fontations.cc diff --git a/src/fontations/lib.rs b/src/fontations/lib.rs index 2e980bce3..538a6ddaa 100644 --- a/src/fontations/lib.rs +++ b/src/fontations/lib.rs @@ -62,7 +62,7 @@ extern "C" fn _hb_fontations_font_funcs_create() -> *mut hb_font_funcs_t { // A helper to attach these funcs to a hb_font_t #[no_mangle] -pub extern "C" fn hb_fontations_font_set_funcs( +pub extern "C" fn _hb_fontations_font_set_funcs( font: *mut hb_font_t, ) { let ffuncs = _hb_fontations_font_funcs_create (); diff --git a/src/hb-fontations.cc b/src/hb-fontations.cc new file mode 100644 index 000000000..110281209 --- /dev/null +++ b/src/hb-fontations.cc @@ -0,0 +1,9 @@ +#include "hb-fontations.h" + +extern "C" void _hb_fontations_font_set_funcs (hb_font_t *font); + +void +hb_fontations_font_set_funcs (hb_font_t *font) +{ + _hb_fontations_font_set_funcs (font); +} diff --git a/src/meson.build b/src/meson.build index 742fbed6f..eaa732a25 100644 --- a/src/meson.build +++ b/src/meson.build @@ -699,6 +699,7 @@ if get_option('fontations').enabled() subdir('fontations') hb_fontations_sources = [ + 'hb-fontations.cc', ] hb_fontations_headers = [