Pre-scale font size: style.fontSize * zoom when zoom is omitted, the
world-unit style.fontSize when it is set.
OptionallineEffective on-screen line height multiplier (defaults to style.lineHeight).
Pre-scale — CSS pixels, or world units when zoom is set.
Top-left in CSS pixels relative to container. Always screen pixels,
including when zoom is set — the scale is anchored at this point, not
translated by it.
OptionalzoomCSS scale applied to the overlay (transform: scale(zoom), anchored at
its top-left). Every other size on this pose, and every typographic
metric the hook writes, is then pre-scale — pass world units and the
transform does the world→screen conversion.
This is the only way run-level typography can be correct at a zoom other
than 1. runsToDom emits run fontSize / letterSpacing in world units
and domToRuns reads them straight back; threading a scale through the
writer and its inverse through the reader would go lossy on fractional
zooms. Scaling the whole overlay instead leaves that serializer pure and
scales node-level and run-level values by the same factor for free.
Omit it (the default, 1) and the pose is plain screen pixels — the hook
then infers the world→screen factor from fontSize / style.fontSize to
scale node-level letterSpacing, and run-level overrides are left
unscaled. Correct only at zoom 1.
Screen-space pose passed to
useTextEditso the overlay can be placed and sized in CSS pixels.