mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 22:41:10 +01:00
Scale all SVG paint and draw coordinates by 1/scale_factor so paths, clips, gradients, transforms, and images emit fractional pixel values instead of font-scale integers. The per-glyph <use> transform now applies only a Y-flip (scale(1,-1)) instead of scale(1/sf,-1/sf), since the content is already in output-space. Revert the 1000000 fill rect bandaid back to 32767 — in output-space, 32767 pixels is always large enough. SVG paint callbacks: - push_clip_glyph: path sink divides by scale_factor - push_clip_rectangle: coords divided by sx/sy - push_transform: translation (dx,dy) divided by sx/sy - gradient coords: divided by sx/sy - sweep center: divided by sx/sy - image extents: divided by sx/sy SVG draw: - Glyph outline path sink divides by scale_factor Regenerated all vector test expected outputs. Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
12 lines
1.2 KiB
XML
12 lines
1.2 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-16 -1000 1545 1289" width="1545" height="1289">
|
|
<defs>
|
|
<path id="p1" d="M194,-12C255,-12 309,20 355,58L358,58L365,0L433,0L433,298C433,419 383,498 264,498C186,498 118,464 73,435L105,378C143,404 194,430 250,430C330,430 350,370 350,308C143,285 52,232 52,126C52,39 113,-12 194,-12ZM218,54C170,54 132,77 132,132C132,194 188,234 350,254L350,119C303,77 265,54 218,54Z"/>
|
|
<path id="p2" d="M297,-12C408,-12 507,85 507,251C507,401 440,498 314,498C260,498 206,469 162,430L164,518L164,712L82,712L82,0L148,0L155,50L158,50C201,11 252,-12 297,-12ZM283,57C251,57 207,71 164,108L164,363C210,406 253,429 294,429C386,429 422,357 422,250C422,130 363,57 283,57Z"/>
|
|
<path id="p3" d="M274,-12C332,-12 387,11 431,50L395,105C365,78 326,56 281,56C192,56 131,131 131,242C131,354 195,430 283,430C322,430 352,412 380,387L422,441C388,472 344,498 280,498C155,498 46,405 46,242C46,81 145,-12 274,-12Z"/>
|
|
</defs>
|
|
<rect x="-16" y="-1000" width="1545" height="1289" fill="rgb(255,255,255)"/>
|
|
<use href="#p1" transform="translate(0,0) scale(1,-1)"/>
|
|
<use href="#p2" transform="translate(504,0) scale(1,-1)"/>
|
|
<use href="#p3" transform="translate(1057,0) scale(1,-1)"/>
|
|
</svg>
|