Files
harfbuzz/docs
Behdad EsfahbodandClaude Opus 4.6 c3b0c4e282 [vector] Add hb_vector_{draw,paint}_svg_{set,get}_prefix
New public API for namespacing SVG output: callers that embed
multiple hb-vector-produced SVGs into the same document can
set a distinct id prefix per context, so hb-vector's short
internal IDs (p<N>, c<N>, clip-g<N>, gr<N>, cg<N>) don't
collide across snippets.

Example collision the new API prevents: page embeds two
hb-vector SVGs produced by different contexts.  Both use
id="clip-g10"; the browser's url(#clip-g10) resolves to
whichever element appears first, so paint layers in the
second SVG get clipped against the first SVG's glyph outline
-- visible as giant unclipped color rects bleeding across
the wrong glyph shape.

With the new API the second caller passes e.g. "b-" as its
prefix; the clash disappears.  Empty/NULL prefix preserves
the existing output byte-for-byte.

Affects every id / url(#...) / href="#..." emission in SVG
output:
  - hb-vector-draw: <path id="p..."> + <use href="#p...">
  - hb-vector-paint: <path>, <clipPath>, <linearGradient>,
    <radialGradient>, <g id="cg..."> color-glyph cache, and
    every corresponding url(#...) / href="#..." ref.
PDF output is unaffected (no ids).

Docs/harfbuzz-sections.txt updated; check-symbols passes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 11:48:54 -06:00
..
2026-04-04 20:31:18 +02:00
2026-03-31 11:31:42 -06:00
2026-03-31 11:31:42 -06:00
2024-06-28 22:54:09 -06:00
2021-09-06 17:25:41 +02:00
2024-07-11 14:39:38 +03:00