From 4f3c3ee0ea76124581262f580ef3a2bd36f2b502 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 26 Jan 2025 22:58:49 -0700 Subject: [PATCH] [hvgl/simd] Only enable if little-endian --- src/hb-aat-var-hvgl-table.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hb-aat-var-hvgl-table.cc b/src/hb-aat-var-hvgl-table.cc index 87741c219..5b354afe7 100644 --- a/src/hb-aat-var-hvgl-table.cc +++ b/src/hb-aat-var-hvgl-table.cc @@ -9,6 +9,7 @@ #endif #ifndef HB_NO_APPLE_SIMD +#include #include // Apple SIMD https://developer.apple.com/documentation/accelerate/simd #endif @@ -96,7 +97,8 @@ PartShape::get_path_at (const struct hvgl &hvgl, bool src_aligned = (uintptr_t) (deltas.get_matrix (axisCount, segmentCount).arrayZ) % 8 == 0; bool dest_aligned = (uintptr_t) (v.arrayZ) % 8 == 0; - if (src_aligned && dest_aligned) + bool be = CFByteOrderGetCurrent () == CFByteOrderBigEndian; + if (!be && src_aligned && dest_aligned) { unsigned rows_count = v.length; for (; axis_index + 4 <= axis_count; axis_index += 4)