Files
harfbuzz/test/vector/data/expected/varc/conditional-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

9 lines
737 B
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="-16 -816 952 1032" width="952" height="1032">
<defs>
<path id="p1" 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.38ZM47945.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)"/>
</svg>