[vector] Increase paint fill/sweep radius from 32767 to 1000000

The SVG and PDF paint backends use large clipped rectangles
to fill solid colors and gradient backgrounds.  The old
constant 32767 was sized for upem-space coordinates (~2048
max).  After the pixel-space change, coordinates can be in
font-scale (upem * SCALE, e.g. 131072 for a 2048-upem font
at SCALE=64).  Values above 32767 fell outside the fill
rect, causing COLRv0 glyph layers to be clipped at the top.

Bump all instances to 1000000 as a bandaid; proper fix is
to emit paint coordinates in output-space.

Regenerated vector test expected outputs.

Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Behdad Esfahbod committed 2026-04-16 23:07:55 -06:00
1 parent b487515093
commit 9161a689f6
4 files changed
+25 -25

No files matched your search

@@ -36,7 +36,7 @@
<g clip-path="url(#clip-g13)">
<g transform="matrix(64,0,0,64,0,0)">
<g transform="matrix(1,0,0,0.9768066,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="url(#gr0)"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="url(#gr0)"/>
</g>
</g>
</g>
@@ -44,42 +44,42 @@
<g transform="matrix(0.015625,0,0,0.015625,0,0)">
<g clip-path="url(#clip-g14)">
<g transform="matrix(64,0,0,64,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="#FA0"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="#FA0"/>
</g>
</g>
</g>
<g transform="matrix(0.015625,0,0,0.015625,0,0)">
<g clip-path="url(#clip-g15)">
<g transform="matrix(64,0,0,64,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="#EDA600"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="#EDA600"/>
</g>
</g>
</g>
<g transform="matrix(0.015625,0,0,0.015625,0,0)">
<g clip-path="url(#clip-g16)">
<g transform="matrix(64,0,0,64,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="#1E88E5"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="#1E88E5"/>
</g>
</g>
</g>
<g transform="matrix(0.015625,0,0,0.015625,0,0)">
<g clip-path="url(#clip-g17)">
<g transform="matrix(64,0,0,64,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="#EDA600"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="#EDA600"/>
</g>
</g>
</g>
<g transform="matrix(0.015625,0,0,0.015625,0,0)">
<g clip-path="url(#clip-g16)">
<g transform="matrix(64,0,0,64,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="url(#gr1)"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="url(#gr1)"/>
</g>
</g>
</g>
<g transform="matrix(0.015625,0,0,0.015625,0,0)">
<g clip-path="url(#clip-g18)">
<g transform="matrix(64,0,0,64,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="#424242" fill-opacity="0.2"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="#424242" fill-opacity="0.2"/>
</g>
</g>
</g>
@@ -87,7 +87,7 @@
<g clip-path="url(#clip-g19)">
<g transform="matrix(64,0,0,64,0,0)">
<g transform="matrix(1,0,0,0.9691162,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="url(#gr2)"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="url(#gr2)"/>
</g>
</g>
</g>
@@ -95,7 +95,7 @@
<g transform="matrix(0.015625,0,0,0.015625,0,0)">
<g clip-path="url(#clip-g20)">
<g transform="matrix(64,0,0,64,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="#EDA600"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="#EDA600"/>
</g>
</g>
</g>

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

@@ -36,7 +36,7 @@
<g clip-path="url(#clip-g13)">
<g transform="matrix(64,0,0,64,0,0)">
<g transform="matrix(1,0,0,0.9768066,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="url(#gr0)"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="url(#gr0)"/>
</g>
</g>
</g>
@@ -44,42 +44,42 @@
<g transform="matrix(0.015625,0,0,0.015625,0,0)">
<g clip-path="url(#clip-g14)">
<g transform="matrix(64,0,0,64,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="#FA0"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="#FA0"/>
</g>
</g>
</g>
<g transform="matrix(0.015625,0,0,0.015625,0,0)">
<g clip-path="url(#clip-g15)">
<g transform="matrix(64,0,0,64,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="#EDA600"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="#EDA600"/>
</g>
</g>
</g>
<g transform="matrix(0.015625,0,0,0.015625,0,0)">
<g clip-path="url(#clip-g16)">
<g transform="matrix(64,0,0,64,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="#1E88E5"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="#1E88E5"/>
</g>
</g>
</g>
<g transform="matrix(0.015625,0,0,0.015625,0,0)">
<g clip-path="url(#clip-g17)">
<g transform="matrix(64,0,0,64,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="#EDA600"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="#EDA600"/>
</g>
</g>
</g>
<g transform="matrix(0.015625,0,0,0.015625,0,0)">
<g clip-path="url(#clip-g16)">
<g transform="matrix(64,0,0,64,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="url(#gr1)"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="url(#gr1)"/>
</g>
</g>
</g>
<g transform="matrix(0.015625,0,0,0.015625,0,0)">
<g clip-path="url(#clip-g18)">
<g transform="matrix(64,0,0,64,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="#424242" fill-opacity="0.2"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="#424242" fill-opacity="0.2"/>
</g>
</g>
</g>
@@ -87,7 +87,7 @@
<g clip-path="url(#clip-g19)">
<g transform="matrix(64,0,0,64,0,0)">
<g transform="matrix(1,0,0,0.9691162,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="url(#gr2)"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="url(#gr2)"/>
</g>
</g>
</g>
@@ -95,7 +95,7 @@
<g transform="matrix(0.015625,0,0,0.015625,0,0)">
<g clip-path="url(#clip-g20)">
<g transform="matrix(64,0,0,64,0,0)">
<rect x="-32767" y="-32767" width="65534" height="65534" fill="#EDA600"/>
<rect x="-1000000" y="-1000000" width="2000000" height="2000000" fill="#EDA600"/>
</g>
</g>
</g>

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB