mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-19 22:11:04 +01:00
Flat mode disabled glyph reuse / caching to produce inline- everything SVG output. Its main use case was making hb-vector SVGs safe to concatenate side-by-side in a single document, but the recently-added svg_set_prefix API solves that without giving up the cache. No remaining callers in tree (util/vector-output.hh's --flat option goes too). Removes: - hb_vector_draw_set_flat / get_flat - hb_vector_paint_set_flat / get_flat - the `flat` field on both contexts - all `if (flat)` / `bool can_cache = !flat` branches - the --flat option in util/vector-output.hh - the four "flat*" expected files in test/vector/basic - the flat_draw / flat_paint params in the vector fuzzer - sections-list entries meson test --no-rebuild green (241/241). Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
To build the fuzzers with libFuzzer to perform actual fuzzing, build with:
CXX=clang++ CXXFLAGS="-fsanitize=address,fuzzer-no-link" meson fuzzbuild --default-library=static -Dfuzzer_ldflags="-fsanitize=address,fuzzer"
ninja -Cfuzzbuild
Then, run the fuzzer like this:
fuzzbuild/test/fuzzing/hb-{shape,raster,vector,subset,set}-fuzzer [-max_len=2048] [CORPUS_DIR]
Where max_len specifies the maximal length of font files to handle. The smaller the faster.
For more details consult the following locations: