resolveLineHeightPx
The whole-pixel line-height for a given font size and tldraw's unitless line-height multiplier. tldraw's theme stores line-height as a multiplier (e.g. 1.35); resolving it to a whole pixel keeps line spacing identical across rendering engines, which otherwise disagree on fractional line boxes (WebKit snaps them to whole pixels, Blink keeps the fraction) and let multi-line text drift apart. Apply it everywhere line-height is used — measurement, on-canvas render, and export — so geometry and rendering agree. See https://github.com/tldraw/tldraw/issues/8970.
function resolveLineHeightPx(fontSize: number, lineHeight: number): number;Parameters
| Name | Description |
|---|---|
| |
| |
Returns
number;Prev
resizeScaledNext
resolveThemes