Files
harfbuzz/test/vector/data/expected/varc/default.svg
T
Behdad Esfahbod d1bb9a595c [util/vector] Drop upem_font; operate in font-scale space
The vector util was creating a separate upem-scaled font clone,
converting all shaping positions from font-scale to upem, and
setting scale_factor to upem/font_size to undo that on emit.

Simplify: use the caller's font directly.  Positions from
shaping are stored as-is (in font-scale = pixel * SCALE).
scale_factor is just SCALE (= 1 << subpixel_bits), so the
lib divides by SCALE on emit to produce pixel-space output.

This removes ~40 lines: the upem_font creation, variation
coord copying, scale_to_upem_x/y helpers, and the complex
upem_per_pixel margin/stroke conversions.  Margin conversion
simplifies from margin * upem * SCALE / x_scale to just
margin * SCALE.

Regenerated vector test expected outputs for the new
coordinate space.

Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 17:11:45 -06:00

11 lines
1.5 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="-16 -819 1872 1035" width="1872" height="1035">
<defs>
<path id="p1" d="M5340.5,7584.22Q11909.24,9480.69 16971.27,12695.1Q22033.29,15909.51 25488.04,20412.54Q28942.79,24915.56 30724.5,30673.78Q32506.22,36431.99 32506.22,43402.95L32506.22,46208L5120,46208L5120,41728L29659.82,41728L27410.29,42496Q27395.17,36810.36 25902.02,31960.6Q24408.87,27110.84 21419.78,23182.69Q18430.69,19254.54 13885.06,16286.96Q9339.42,13319.39 3213.25,11354.79L5340.5,7584.22ZM44928,25600.01L56768,25600.01L56768,30080.01L44928,30080.01L44928,25600.01ZM42624,-5248L47488,-5248L47488,51392L42624,51392L42624,-5248Z"/>
<path id="p2" d="M5494.89,18183.38Q12239.27,19519.44 17299.55,21885.18Q22359.83,24250.92 25736.19,27650.73Q29112.54,31050.55 30809.22,35486.54Q32505.91,39922.52 32505.91,45379.34L32505.91,47744L5120,47744L5120,43264L29684.74,43264L27291.89,44032Q27259.9,39999.75 25797.58,36572.43Q24335.26,33145.12 21419.72,30393.42Q18504.18,27641.72 14090.57,25584.03Q9676.95,23526.34 3761.91,22206.24L5494.89,18183.38ZM45376,32512.41L57216,32512.41L57216,36992.41L45376,36992.41L45376,32512.41ZM43072,18287.5L47936,18287.5L47936,51392L43072,51392L43072,18287.5ZM47945.03,-5982.69L47945.03,11904L47945.03,15104L12544,15104L12544,10624L45576.94,10624L43180.36,11648L43180.36,-5982.69L47945.03,-5982.69Z"/>
</defs>
<use href="#p1" transform="translate(0,0) scale(0.015625,-0.015625)"/>
<use href="#p2" transform="translate(920,0) scale(0.015625,-0.015625)"/>
</svg>