Files
harfbuzz/test/vector/data/expected/basic/default.svg
T
Behdad Esfahbod 7c54a401c0 [vector-draw] Add foreground/background color API
Add hb_vector_draw_set_{foreground,background}() and getters.

SVG: foreground wraps body in <g fill="rgb(...)">; background
emits a <rect> covering the viewBox before content.

PDF: foreground sets fill color via rg operator before glyph
content; background emits a filled rect at the start of the
content stream.

Default: foreground opaque black, background transparent.

Wire both into the hb-vector CLI util alongside the paint
equivalents.  Remove the old util-side emit_background_rect.

Regenerated vector test expected outputs.

Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 19:13:33 -06:00

14 lines
1.9 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="-16 -1916 3367 2432" width="3367" height="2432">
<defs>
<path id="p1" d="M51712,0Q50688,2048 50048,7296Q41792,-1280 30336,-1280Q20096,-1280 13536,4512Q6976,10304 6976,19200Q6976,30016 15200,36000Q23424,41984 38336,41984L49856,41984L49856,47424Q49856,53632 46144,57312Q42432,60992 35200,60992Q28864,60992 24576,57792Q20288,54592 20288,50048L8384,50048Q8384,55232 12064,60064Q15744,64896 22048,67712Q28352,70528 35904,70528Q47872,70528 54656,64544Q61440,58560 61696,48064L61696,16192Q61696,6656 64128,1024L64128,0L51712,0ZM32064,9024Q37632,9024 42624,11904Q47616,14784 49856,19392L49856,33600L40576,33600Q18816,33600 18816,20864Q18816,15296 22528,12160Q26240,9024 32064,9024Z"/>
<path id="p2" d="M67584,33856Q67584,17984 60288,8352Q52992,-1280 40704,-1280Q27584,-1280 20416,8000L19840,0L8960,0L8960,98304L20800,98304L20800,61632Q27968,70528 40576,70528Q53184,70528 60384,60992Q67584,51456 67584,34880L67584,33856ZM55744,35200Q55744,47296 51072,53888Q46400,60480 37632,60480Q25920,60480 20800,49600L20800,19648Q26240,8768 37760,8768Q46272,8768 51008,15360Q55744,21952 55744,35200Z"/>
<path id="p3" d="M36736,8384Q43072,8384 47808,12224Q52544,16064 53056,21824L64256,21824Q63936,15872 60160,10496Q56384,5120 50080,1920Q43776,-1280 36736,-1280Q22592,-1280 14240,8160Q5888,17600 5888,33984L5888,35968Q5888,46080 9600,53952Q13312,61824 20256,66176Q27200,70528 36672,70528Q48320,70528 56032,63552Q63744,56576 64256,45440L53056,45440Q52544,52160 47968,56480Q43392,60800 36672,60800Q27648,60800 22688,54304Q17728,47808 17728,35520L17728,33280Q17728,21312 22656,14848Q27584,8384 36736,8384Z"/>
</defs>
<rect x="-16" y="-1916" width="3367" height="2432" fill="rgb(255,255,255)"/>
<use href="#p1" transform="translate(0,0) scale(0.015625,-0.015625)"/>
<use href="#p2" transform="translate(1114,0) scale(0.015625,-0.015625)"/>
<use href="#p3" transform="translate(2263,0) scale(0.015625,-0.015625)"/>
</svg>