Repository navigation
capi: collect nominal cmap Unicode coverage - #526
Conversation
dfrg
left a comment
There was a problem hiding this comment.
The generic Fontations iterator does not implement format 0.
Thanks, seems like this should be fixed in fontations.
Link the temporary read-fonts 0.45 workaround to Fontations #2265. Keep coverage working with the released dependency until the upstream iterator support is published.
|
Implemented format 0 iteration upstream in Fontations #2265, adding Removed the format 0 fallback and its coverage cases from this PR. Format 0 now follows the generic iterator, so collecting its coverage depends on a Validation: 152 C API tests pass with the published dependency. With the upstream fix patched in, the full corpus has 493 matching coverage sets and two independently verified format-13 sets. |
Remove the format 0 fallback and its C API coverage cases. The generic iterator will cover that format once read-fonts includes Fontations #2265.
Chromium's optional subset fuzzer calls
hb_face_collect_unicodesto populate its input Unicode set. Add the correspondinghr_face_collect_unicodesentry point and HarfBuzz compatibility alias, using the selected cmap subtable's raw character codes and preserving existing set entries.Format 0 iteration is implemented upstream in Fontations #2265, and coverage for that format depends on a release containing that fix. Insert format-13 constant-glyph ranges directly, bounded by valid glyph IDs and the Unicode range, and exclude format-4's sentinel. Symbol/Mac Roman lookup remapping and variation selectors do not change the collected character codes.
Validation:
read-fonts0.45: 491 coverage sets match HarfBuzz 14.6.0, with the two format-0 faces excluded; two format-13 sets are independently verified.Adds a reusable ctypes comparison script and regression tests for additive collection, empty/null handles, inverted sets, and a format-13 last-resort font.
Closes the optional subset-fuzzer API gap in #520; Chromium build integration is tracked separately there.