mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 22:41:10 +01:00
hb_vector_{paint,draw}_set_extents stored caller-supplied
extents as-is, while per-glyph extents accumulated via
hb_vector_set_glyph_extents_common were divided by
scale_factor on the way in. When callers passed extents in
input-space (the natural unit alongside the glyph geometry
they're feeding) and a non-1 scale_factor, the resulting
viewBox didn't match what the glyphs drew.
Make set_extents divide by scale_factor too, matching the
accumulate path; callers can now pass input-space extents
uniformly.
Also:
* hb-vector-paint's global transform wrapper dropped the
redundant /scale_factor division. Each per-glyph
<use transform="... scale(1/scale_factor, ...)"> already
applies scale_factor; wrapping the body in another
/scale_factor matrix double-scaled the output, shrinking
color-glyph output to 1/scale_factor^2 of its intended
size. The wrapper now only fires when the user set a
non-identity paint->transform, and emits that transform
as-is.
* util/vector-output.hh simplification: now that set_extents
handles the divide, drop the local pre-multiply of extents
by upem_to_pixel -- pass the upem-space extents through.
Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>