mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-25 00:41:09 +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>
8 lines
660 B
XML
8 lines
660 B
XML
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-16 -816 952 1032" width="952" height="1032">
|
|
<defs>
|
|
<path id="p1" 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.12ZM749.14,-93.48L749.14,186L749.14,236L196,236L196,166L712.14,166L674.69,182L674.69,-93.48L749.14,-93.48Z"/>
|
|
</defs>
|
|
<rect x="-16" y="-816" width="952" height="1032" fill="rgb(255,255,255)"/>
|
|
<use href="#p1" transform="translate(0,0) scale(1,-1)"/>
|
|
</svg>
|