mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-29 01:23:56 +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>
10 lines
1.2 KiB
XML
10 lines
1.2 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-16 -819 1872 1035" width="1872" height="1035">
|
|
<defs>
|
|
<path id="p1" d="M83.45,118.5Q186.08,148.14 265.18,198.36Q344.27,248.59 398.25,318.95Q452.23,389.31 480.07,479.28Q507.91,569.25 507.91,678.17L507.91,722L80,722L80,652L463.43,652L428.29,664Q428.05,575.16 404.72,499.38Q381.39,423.61 334.68,362.23Q287.98,300.85 216.95,254.48Q145.93,208.12 50.21,177.42L83.45,118.5ZM702,400L887,400L887,470L702,470L702,400ZM666,-82L742,-82L742,803L666,803L666,-82Z"/>
|
|
<path id="p2" d="M85.86,284.12Q191.24,304.99 270.31,341.96Q349.37,378.92 402.13,432.04Q454.88,485.16 481.39,554.48Q507.9,623.79 507.9,709.05L507.9,746L80,746L80,676L463.82,676L426.44,688Q425.94,625 403.09,571.44Q380.24,517.89 334.68,474.9Q289.13,431.9 220.17,399.75Q151.2,367.6 58.78,346.97L85.86,284.12ZM709,508.01L894,508.01L894,578.01L709,578.01L709,508.01ZM673,285.74L749,285.74L749,803L673,803L673,285.74ZM749.14,-93.48L749.14,186L749.14,236L196,236L196,166L712.14,166L674.69,182L674.69,-93.48L749.14,-93.48Z"/>
|
|
</defs>
|
|
<rect x="-16" y="-819" width="1872" height="1035" fill="rgb(255,255,255)"/>
|
|
<use href="#p1" transform="translate(0,0) scale(1,-1)"/>
|
|
<use href="#p2" transform="translate(920,0) scale(1,-1)"/>
|
|
</svg>
|