Vector reset omitted draw colors, paint background, SVG id prefixes,
and custom palette overrides. Restore these defaults while preserving
configuration across clear.
The PDF draw context also kept its opacity resource dictionary and
counter after clear, including automatic clearing after render.
Clear both with the accumulated output so later documents do not carry
resources from earlier renders.
Add regressions for SVG/PDF reset, configuration preservation, custom
palette overrides, and fresh-context PDF equivalence after explicit
clear, reset, and repeated rendering. All three regression groups fail
against the original implementation.
Tested with meson test -C build: 288 passed, 1 skipped, 0 failed.
The vector suite and the issue reproducer pass. The regression also
compiles and runs as C99 with -Wall -Wextra -Werror.
Fixes: https://github.com/harfbuzz/harfbuzz/issues/6342
Assisted-by: OpenAI Codex
* [meson] Skip vector tests when vector is disabled
The vector budget test was built unconditionally even when vector was
explicitly disabled. Its empty dependency supplied neither include paths
nor libraries, breaking otherwise valid reduced-feature builds.
Skip the vector test directory when the library is disabled. Add a Linux
CI build and test pass with vector disabled to cover this configuration.
Reproduced the missing hb.h failure on Linux before the fix. The full
suite with vector, raster, and GPU disabled passed 229 tests with one
skip; all three vector tests passed with vector enabled.
Fixes: https://github.com/harfbuzz/harfbuzz/issues/6277
Assisted-by: OpenAI Codex <codex@openai.com>
* [ci] Remove extra vector-disabled build pass
Keep the fix focused on guarding the vector test directory without adding
another build and test pass to the Linux workflow.
CI-only change; the previously validated Meson guard is unchanged.
Assisted-by: OpenAI Codex <codex@openai.com>
* [meson] Guard dependency fuzzers when subset is disabled
With experimental APIs enabled, dependency fuzzers referenced
libharfbuzz_subset even when the subset library was disabled, causing
Meson setup to fail with an unknown-variable error.
Require subset support when building the dependency fuzzers and when
registering their tests.
Full tests with experimental APIs enabled: 92 passed with subset
disabled, and 247 passed with subset enabled. Both dependency fuzzers
and their 13 tests remain registered in the enabled configuration.
Assisted-by: OpenAI Codex <codex@openai.com>
Store budget policy and live state on vector draw and paint contexts. Path
sinks borrow the owning context's live counter, making glyph traversal,
serialized path commands, and sweep-gradient patches consume one aggregate
budget throughout a clear-to-render session.
Recharge the configured policy on clear, restore the finite default on
reset, and expose the generic draw and paint budget callbacks for SVG and
PDF contexts. Add lifecycle and traversal-depletion coverage for both
formats.
Tests: meson test -C build (273/273 passed)
Assisted-by: OpenAI Codex <codex@openai.com>