Replace manual command-line parsing with glib's GOptionContext/GOptionEntry system to match other HarfBuzz test tools. Changes: - Add glib_dep to meson.build for hb-depend-closure-parity - Use G_OPTION_ARG_INT64 for hex test seeds (requires 0x prefix) - Implement parse_inject_rate callback for optional float args with defaults - Update help text to require 0x prefix for hex values - Call print_usage() on argument validation errors - All test seed output verified to use 0x prefix Benefits: - Automatic --help generation by glib - Consistent with other HarfBuzz utilities - Simpler error handling and validation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Security Fuzzers
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,repacker,depend}-fuzzer [-max_len=2048] [CORPUS_DIR]
Where max_len specifies the maximal length of font files to handle. The smaller the faster.
Note: The depend fuzzer requires -Ddepend_api=true meson option.
For more details consult the following locations:
Depend Closure Parity Test
The hb-depend-closure-parity test is distinct from the security fuzzers.
While security fuzzers test robustness against malformed input, the closure
parity test validates correctness by emulating the glyph closure calculation
used for subsetting with one generated from the dependency graph to avoid
implementation divergence. It should only be run on valid fonts.