CSS declarations reproducing the clip's typography in UNSCALED text units (the units fontSize,
padding, wordWrapWidth are stored in). Keys are camelCase so the object can be spread into a
React style prop or Object.assigned onto an HTMLElement.style.
textShadow and WebkitTextStroke reproduce what the renderer paints. A transparent overlay that
only supplies the caret (color: transparent over the canvas glyphs) must override both to
none / 0, otherwise the shadow and the stroke are painted a second time over the canvas.
The clip scale and the canvas-to-screen ratio are deliberately NOT baked in: apply them as one
CSS transform: scale() on the element that hosts the text (see TextEditOverlay.scale),
so non-uniform scale and flips behave exactly like the sprite.
CSS declarations reproducing the clip's typography in UNSCALED text units (the units
fontSize,padding,wordWrapWidthare stored in). Keys are camelCase so the object can be spread into a Reactstyleprop orObject.assigned onto anHTMLElement.style.textShadowandWebkitTextStrokereproduce what the renderer paints. A transparent overlay that only supplies the caret (color: transparentover the canvas glyphs) must override both tonone/0, otherwise the shadow and the stroke are painted a second time over the canvas.The clip scale and the canvas-to-screen ratio are deliberately NOT baked in: apply them as one CSS
transform: scale()on the element that hosts the text (see TextEditOverlay.scale), so non-uniform scale and flips behave exactly like the sprite.