mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 06:51:01 +01:00
#6500 made the CBDT accelerator build a per-face (ppem, glyph range) -> record index at load time, with a strike set/map, a sorted vector, a walk_ppems fallback and an HB_CBDT_MAX_INDEX_ENTRIES cap, to avoid walking a huge strike array on every glyph query. Real fonts have a handful of strikes, so that machinery costs every CBDT face memory and load time for the benefit of pathological fonts only. Remove it and restore the simple CBLC::choose_strike() and BitmapSizeTable::find_table() lookup path, but only consider the first HB_CBLC_MAX_STRIKES (256) strikes when choosing one; later ones are ignored. ppem is 8-bit, so this never drops a distinct size a real font could need. The sbix strike index, the CBDT subsetter's record map and its image-copy budget from #6500 are kept unchanged. Adds test_hb_ot_color_png_cbdt_max_strikes, which places the only usable strike at index 255 / 256 and checks it is found / ignored; it fails with the cap removed. Full meson test passes. Follow-up to #6500 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>