Files
harfbuzz/src
Behdad EsfahbodandClaude Opus 5.5 9e65a95d62 [aat] Share the segment-collection guard between Lookup formats 2 and 4 (#6612)
#6513 made LookupFormat2::collect_glyphs_filtered() stop adding
segments one by one once they are out of order, folding the rest into
a single range.  It did so with an inline copy of the segment logic
instead of the segment's own methods, and LookupFormat4 kept the old
loop, so repeated full-range format-4 segments each still cost a full
pass (bounded only by sanitize's per-byte max_ops on the value arrays).

Move the loop into collect_segments_glyphs_filtered(), shared by both
formats.  It asks each segment type whether it may contribute
(may_match()) and collects through the segment's own
collect_glyphs_filtered().  Format-2 segments check their value against
the filter.  Format-4 segments only check their range, so out-of-order
format-4 segments are folded into a superset without reading their
values.  Format 4's collect_glyphs() now uses the filtered path with an
always-true filter, as format 2's already does.  Sorted tables produce
the same sets as before.

Testing: meson test -C build (all passing).

Follow-up to #6513

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 18:03:08 -06:00
..
2026-08-12 18:27:23 -06:00
2026-07-31 04:31:26 +03:00
2026-07-31 04:31:26 +03:00
…
2025-10-17 15:23:05 -06:00
2025-03-12 23:56:52 -06:00
…
2026-11-04 23:03:36 +02:00
2026-09-21 00:41:07 +03:00
2026-09-21 00:41:07 +03:00
2026-09-21 00:41:07 +03:00
2026-10-16 00:19:21 +03:00
2025-03-24 00:33:53 +02:00
2025-09-15 23:56:25 -06:00
…
…
2026-04-20 05:10:48 +02:00
2026-04-20 05:10:48 +02:00
2024-10-27 16:14:53 -07:00
…
2026-10-22 17:05:31 +03:00
…
…
2025-04-08 01:58:10 -06:00
2025-08-07 22:38:58 -06:00
2026-07-31 17:49:40 +03:00
2026-07-31 17:49:40 +03:00
2025-08-07 22:38:58 -06:00
2026-03-19 00:45:24 +02:00
2026-07-31 04:31:26 +03:00
2026-09-21 00:41:07 +03:00
2026-04-18 10:58:44 -06:00
2026-09-21 00:41:07 +03:00
2026-08-26 22:27:05 +03:00
2026-08-19 16:00:05 -06:00
2025-07-23 21:39:23 +03:00
2024-08-23 08:58:50 -06:00
2026-07-31 17:49:40 +03:00
2025-01-11 18:13:18 +02:00
2026-07-30 12:00:47 -06:00
2026-10-01 16:27:20 -06:00
…
2026-04-20 01:29:49 +02:00
2026-11-04 23:03:36 +02:00
2025-03-07 18:19:29 -07:00
2026-08-12 18:33:09 -06:00
…
2026-06-05 13:44:29 +02:00
…