mirror of
https://github.com/penpot/penpot.git
synced 2026-11-26 21:00:32 +00:00
* 🐛 Keep trailing spaces in WASM text bounds Skia's longest_line() and line widths leave out the spaces at the end of a line, so auto-width texts lost their trailing spaces in the selrect, and the tight text bounds cut them off too. Fonts that draw a glyph for spaces, like Zilla Slab Highlight, showed the gap. - Measure auto-width text with max_intrinsic_width(), which keeps trailing spaces. - Extend each line's tight bounds with the rects of its whole range, trailing spaces included. Closes #12998 AI-assisted-by: claude-opus-5-5 * 🐛 Paint trailing spaces in WASM text Skia lays out the spaces at the end of a line but never paints them. Fonts that draw a glyph for spaces, like Zilla Slab Highlight, lost those glyphs on the WebGL renderer. - End each paragraph that ends in whitespace with a zero-size placeholder. The spaces are no longer trailing, so Skia measures and paints them with the right glyphs and paints. - Add it to the fill and stroke builders alike, so their layouts match. - Leave it out when it would wrap onto a line of its own in a fixed or auto-height box, which would add an empty line. A probe layout per paragraph decides this, cached per content version and box width. Closes #12998 AI-assisted-by: claude-opus-5-5