From 202202b349ab6dab86575fa1669614396e2e83a4 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 27 May 2026 09:38:31 +0200 Subject: [PATCH] [test] Disable stale beyond-64k API checks The disabled assertions cover behavior from an older beyond-64k proposal. That proposal has since changed, and current backends should not be required to implement the stale loca-derived glyph count and metrics rules. Keep the checks visible as disabled reminders until the library code is adapted to the updated design. Tested with: CCACHE_DISABLE=1 HB_FONT_FUNCS=fontations meson test -C build test-be-glyph-advance test-be-num-glyphs Assisted-by: OpenAI Codex --- test/api/test-be-glyph-advance.c | 5 ++++- test/api/test-be-num-glyphs.c | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/test/api/test-be-glyph-advance.c b/test/api/test-be-glyph-advance.c index 300746dcb..930f87f21 100644 --- a/test/api/test-be-glyph-advance.c +++ b/test/api/test-be-glyph-advance.c @@ -77,7 +77,10 @@ test_maxp_and_hmtx (void) g_assert_cmpuint (hb_font_get_glyph_h_advance (font, 2), ==, 3); g_assert_cmpuint (hb_font_get_glyph_h_advance (font, 3), ==, 3); g_assert_cmpuint (hb_font_get_glyph_h_advance (font, 4), ==, 3); -#ifndef HB_NO_BEYOND_64K +#if 0 + /* These checks belonged to an old beyond-64k proposal that has since + * changed. The library code needs to adapt before testing this behavior. + */ g_assert_cmpuint (hb_font_get_glyph_h_advance (font, 5), ==, 8); g_assert_cmpuint (hb_font_get_glyph_h_advance (font, 6), ==, 9); g_assert_cmpuint (hb_font_get_glyph_h_advance (font, 7), ==, 9); diff --git a/test/api/test-be-num-glyphs.c b/test/api/test-be-num-glyphs.c index 866343fe5..3001164c3 100644 --- a/test/api/test-be-num-glyphs.c +++ b/test/api/test-be-num-glyphs.c @@ -34,7 +34,10 @@ test_maxp_and_loca (void) const char maxp_data[] = "\x00\x00\x50\x00" // version "\x00\x05" // numGlyphs ; -#ifndef HB_NO_BEYOND_64K +#if 0 + /* These checks belonged to an old beyond-64k proposal that has since + * changed. The library code needs to adapt before testing this behavior. + */ const char loca_data[18] = ""; #endif @@ -47,7 +50,10 @@ test_maxp_and_loca (void) g_assert_cmpuint (hb_face_get_glyph_count (face), ==, 5); hb_face_destroy (face); -#ifndef HB_NO_BEYOND_64K +#if 0 + /* These checks belonged to an old beyond-64k proposal that has since + * changed. The library code needs to adapt before testing this behavior. + */ face = hb_face_builder_create (); HB_FACE_ADD_TABLE (face, "maxp", maxp_data); HB_FACE_ADD_TABLE (face, "loca", loca_data);