mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 16:31:14 +01:00
[vector] Keep SVG path clips in the body's coordinate space (#6471)
The SVG body is flipped from font coordinates once at render time. The path-clip callback still emitted its own vertical flip from the older renderer, mirroring the clip relative to the drawing. Remove that transform, matching rectangle and glyph clips. Add a paint/show-extents vector regression and generate its expected SVG with hb-vector. It fails on the old code. The full Meson suite passes (293 tests). Reported by Anthropic's OSS Scanner as ordinary bug ANT-2026-BZKWFGVZ. Assisted-by: OpenAI Codex
This commit is contained in:
1 parent
f030bd2186
commit
3c0e2b42d5
3 files changed
+33
-7
No files matched your search
@@ -0,0 +1,26 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-16 -1916 3367 2432" width="3367" height="2432">
|
||||
<defs>
|
||||
<clipPath id="cp0"><path d="M108,-21L1003,-21L1003,1103L108,1103L108,-21ZM109,-20L109,1102L1002,1102L1002,-20L109,-20ZM2,0C2,1.1 1.1,2 0,2C-1.1,2 -2,1.1 -2,0C-2,-1.1 -1.1,-2 0,-2C1.1,-2 2,-1.1 2,0Z"/></clipPath>
|
||||
<clipPath id="cp1"><path d="M1253,-21L2171,-21L2171,1537L1253,1537L1253,-21ZM1254,-20L1254,1536L2170,1536L2170,-20L1254,-20ZM1116,0C1116,1.1 1115.1,2 1114,2C1112.9,2 1112,1.1 1112,0C1112,-1.1 1112.9,-2 1114,-2C1115.1,-2 1116,-1.1 1116,0Z"/></clipPath>
|
||||
<clipPath id="cp2"><path d="M2354,-21L3268,-21L3268,1103L2354,1103L2354,-21ZM2355,-20L2355,1102L3267,1102L3267,-20L2355,-20ZM2265,0C2265,1.1 2264.1,2 2263,2C2261.9,2 2261,1.1 2261,0C2261,-1.1 2261.9,-2 2263,-2C2264.1,-2 2265,-1.1 2265,0Z"/></clipPath>
|
||||
</defs>
|
||||
<rect x="-16" y="-1916" width="3367" height="2432" fill="rgb(255,255,255)"/>
|
||||
<g transform="scale(1,-1)">
|
||||
<path d="M808,0Q792,32 782,114Q653,-20 474,-20Q314,-20 211.5,70.5Q109,161 109,300Q109,469 237.5,562.5Q366,656 599,656L779,656L779,741Q779,838 721,895.5Q663,953 550,953Q451,953 384,903Q317,853 317,782L131,782Q131,863 188.5,938.5Q246,1014 344.5,1058Q443,1102 561,1102Q748,1102 854,1008.5Q960,915 964,751L964,253Q964,104 1002,16L1002,0L808,0ZM501,141Q588,141 666,186Q744,231 779,303L779,525L634,525Q294,525 294,326Q294,239 352,190Q410,141 501,141Z" fill="#000"/>
|
||||
<g clip-path="url(#cp0)">
|
||||
<rect x="-32767" y="-32767" width="65534" height="65534" fill="#000"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,1114,0)">
|
||||
<path d="M1056,529Q1056,281 942,130.5Q828,-20 636,-20Q431,-20 319,125L310,0L140,0L140,1536L325,1536L325,963Q437,1102 634,1102Q831,1102 943.5,953Q1056,804 1056,545L1056,529ZM871,550Q871,739 798,842Q725,945 588,945Q405,945 325,775L325,307Q410,137 590,137Q723,137 797,240Q871,343 871,550Z" fill="#000"/>
|
||||
</g>
|
||||
<g clip-path="url(#cp1)">
|
||||
<rect x="-32767" y="-32767" width="65534" height="65534" fill="#000"/>
|
||||
</g>
|
||||
<g transform="matrix(1,0,0,1,2263,0)">
|
||||
<path d="M574,131Q673,131 747,191Q821,251 829,341L1004,341Q999,248 940,164Q881,80 782.5,30Q684,-20 574,-20Q353,-20 222.5,127.5Q92,275 92,531L92,562Q92,720 150,843Q208,966 316.5,1034Q425,1102 573,1102Q755,1102 875.5,993Q996,884 1004,710L829,710Q821,815 749.5,882.5Q678,950 573,950Q432,950 354.5,848.5Q277,747 277,555L277,520Q277,333 354,232Q431,131 574,131Z" fill="#000"/>
|
||||
</g>
|
||||
<g clip-path="url(#cp2)">
|
||||
<rect x="-32767" y="-32767" width="65534" height="65534" fill="#000"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
Reference in new issue
Block a user