From 03c3e45dfe1aa2d0879ea13dc4439aceaea9371a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 25 Aug 2026 10:00:11 -0600 Subject: [PATCH] [arabic] Enable Win1256 fallback on all platforms (#6209) The Win1256 fallback is a static GSUB recipe selected by a narrow glyph-ID signature; it does not call a Windows API. Enable it outside Windows too, while retaining HB_NO_WIN1256 as an explicit opt-out. Tested: meson test -C build; build with -DHB_NO_WIN1256 Assisted-by: Codex --- src/hb-ot-shaper-arabic-fallback.hh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/hb-ot-shaper-arabic-fallback.hh b/src/hb-ot-shaper-arabic-fallback.hh index b82de35aa..ef90cb4fe 100644 --- a/src/hb-ot-shaper-arabic-fallback.hh +++ b/src/hb-ot-shaper-arabic-fallback.hh @@ -231,11 +231,7 @@ struct arabic_fallback_plan_t OT::hb_ot_layout_lookup_accelerator_t *accel_array[ARABIC_FALLBACK_MAX_LOOKUPS]; }; -#if defined(_WIN32) && !defined(HB_NO_WIN1256) -#define HB_WITH_WIN1256 -#endif - -#ifdef HB_WITH_WIN1256 +#ifndef HB_NO_WIN1256 #include "hb-ot-shaper-arabic-win1256.hh" #endif @@ -254,7 +250,7 @@ arabic_fallback_plan_init_win1256 (arabic_fallback_plan_t *fallback_plan HB_UNUS const hb_ot_shape_plan_t *plan HB_UNUSED, hb_font_t *font HB_UNUSED) { -#ifdef HB_WITH_WIN1256 +#ifndef HB_NO_WIN1256 /* Does this font look like it's Windows-1256-encoded? */ hb_codepoint_t g; if (!(hb_font_get_glyph (font, 0x0627u, 0, &g) && g == 199 /* ALEF */ &&