Files
harfbuzz/src
Skef IterumandClaude 97362b2c14 Adopt struct-based edge deduplication pattern
Refactor edge deduplication to follow HarfBuzz's established pattern
(as used in hb-serialize.hh and elsewhere), using struct-based hashing
instead of manual hash computation.

Changes:

1. Add operator== and hash() to hb_depend_data_record_t
   - Self-contained equality comparison of all identity fields
   - FNV-1a hash implementation
   - Flags intentionally excluded (metadata about discovery, not identity)
   - Documents why flags are excluded from equality

2. Add edge_key_t struct for deduplication
   - Combines source glyph with edge record
   - Simple operators that delegate to record's operator== and hash()
   - Requires default constructor for hashmap usage

3. Remove manual hash code (~110 lines deleted)
   - Delete get_edge_components() (~37 lines)
   - Delete compute_edge_hash() (~37 lines)
   - Delete edges_equal() (~33 lines)

4. Simplify add_depend_layout() (from ~50 to ~25 lines)
   - Create key, check hashmap, add if new
   - No collision handling needed (hashmap handles it)
   - No component vector storage

5. Replace storage
   - Old: hb_hashmap_t<uint64_t, hb_vector_t<uint32_t>> edge_hashes
   - New: hb_hashmap_t<edge_key_t, bool> seen_edges
   - Update cleanup in hb-depend.cc

Semantic change:
- Old: Compared set CONTENTS (iterated through set elements)
- New: Compares set INDICES directly
- Safe because: context sets deduplicated (same contents = same index),
  ligature sets intentionally unique (different rules = different indices)
- In practice: no real fonts have identical ligature components with
  different indices for the same layout_tag

Benefits:
- Follows established HarfBuzz pattern
- Simpler semantic (index-based comparison)
- Less code (~110 lines eliminated)
- Less memory (no component vector storage)
- More maintainable (single source of truth in record struct)
- Better separation of concerns (hashing logic in struct)

All tests pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-05 21:49:59 -08:00
..
2025-05-08 16:03:02 +03:00
2023-07-08 13:51:07 -04:00
2024-03-30 02:20:21 +02:00
2025-08-15 00:54:52 -06:00
2025-03-13 01:07:35 -06:00
2023-01-12 10:44:08 -07:00
…
2025-12-23 15:38:18 -07:00
2025-10-17 15:23:05 -06:00
2025-11-21 17:47:14 -07:00
2025-09-15 20:52:05 -06:00
2025-09-18 10:57:43 -04:00
2025-03-12 23:56:52 -06:00
2023-02-21 18:07:53 +02:00
2025-09-02 14:21:57 -06:00
2025-03-24 00:33:53 +02:00
2025-04-23 18:23:51 -06:00
2023-02-11 23:52:58 +02:00
2025-06-08 13:43:27 +03:00
2024-04-01 01:55:38 -06:00
2025-04-08 02:13:39 -06:00
2025-06-08 13:43:27 +03:00
2025-03-12 18:27:27 -06:00
2025-07-20 21:40:37 +03:00
2025-07-20 21:40:37 +03:00
2025-03-24 00:33:53 +02:00
2025-09-15 23:56:25 -06:00
2025-06-08 13:43:27 +03:00
…
…
2025-06-08 13:43:27 +03:00
…
2024-10-27 16:14:53 -07:00
…
2025-08-29 00:08:28 -06:00
2023-08-25 07:51:05 -06:00
2023-06-03 14:56:47 -06:00
2025-04-08 01:58:10 -06:00
2025-03-12 18:27:27 -06:00
2026-02-05 12:44:49 -07:00
2025-08-07 22:38:58 -06:00
2025-09-15 20:52:05 -06:00
2025-06-08 13:43:27 +03:00
2022-12-26 11:29:26 -07:00
2025-10-01 08:24:34 +03:00
2026-02-05 19:11:40 -08:00
2023-02-11 23:52:58 +02:00
2025-08-07 22:38:58 -06:00
2025-08-27 15:36:48 -06:00
2025-02-06 14:26:37 +00:00
2025-11-11 12:29:06 -07:00
2025-03-12 17:16:55 -06:00
2025-06-08 13:43:27 +03:00
2024-04-16 17:10:09 -06:00
2025-06-08 13:43:27 +03:00
…
2025-06-08 13:43:27 +03:00
2025-06-08 13:43:27 +03:00
2025-04-22 21:57:02 -06:00
2025-04-23 00:43:56 -06:00
2025-06-08 13:43:27 +03:00
2025-11-10 02:55:44 -07:00
2025-10-01 08:24:34 +03:00
2025-09-15 23:56:25 -06:00
2025-09-23 11:23:03 -04:00
2023-08-25 07:51:05 -06:00
2023-06-03 14:56:47 -06:00
2022-07-20 15:38:34 -06:00
2025-07-23 21:39:23 +03:00
2025-08-07 22:38:58 -06:00
2024-08-23 08:58:50 -06:00
2025-02-12 21:52:01 -05:00
2025-01-11 18:13:18 +02:00
2025-01-11 18:13:18 +02:00
2025-07-25 00:05:46 -06:00
2025-07-24 22:47:08 -06:00
2022-11-20 13:54:56 -07:00
2023-01-12 13:58:46 -07:00
2023-04-27 00:48:00 +02:00
2025-05-12 14:05:39 -06:00
2023-07-31 12:43:12 -06:00
2025-08-28 15:58:39 -06:00
2026-01-24 14:09:52 +02:00
2024-04-01 01:55:38 -06:00
2023-03-31 17:33:45 -06:00
2026-02-05 19:11:40 -08:00
2025-03-07 18:19:29 -07:00
2024-10-01 11:33:20 -06:00
2026-02-05 19:11:40 -08:00
2022-11-15 15:52:04 -07:00
2022-08-02 12:18:18 -06:00
2023-01-12 17:04:24 -07:00