SUMMARY Line-height appears to be capped at a minimum. STEPS TO REPRODUCE 1. Use SVG for text: ``` <text style="fill:#000000; letter-spacing:0; font-family:Noto Sans; stroke-width:0; line-height:0; white-space: pre"><tspan x="0">Line 1 </tspan><tspan x="0">Line 2</tspan></text> ``` OBSERVED RESULT The two lines of text does not overlap. EXPECTED RESULT The two lines of text should overlap and rendered on the same y position.
Git commit b90110d3e0420eed1e258f3178f2a89660cedefe by Wolthera van Hövell tot Westerflier. Committed on 02/08/2023 at 17:36. Pushed by woltherav into branch 'master'. Fix line-height being capped due to naive handling of negative ascent. Because ascent and descent can be negative or positive depending on the writing mode, the intial code attempted to regard them somewhat agnostic until it was time to calculate the precise offset. This however capped the offset to 0, and made it impossible to have negative line-offsets. The code now considers negative values appropriately. M +45 -26 libs/flake/text/KoSvgTextShape.cpp https://invent.kde.org/graphics/krita/-/commit/b90110d3e0420eed1e258f3178f2a89660cedefe
Git commit de2549670876392fb9c46dc1842245482a0bb428 by Wolthera van Hövell, on behalf of Wolthera van Hövell tot Westerflier. Committed on 02/08/2023 at 17:53. Pushed by woltherav into branch 'krita/5.2'. Fix line-height being capped due to naive handling of negative ascent. Because ascent and descent can be negative or positive depending on the writing mode, the intial code attempted to regard them somewhat agnostic until it was time to calculate the precise offset. This however capped the offset to 0, and made it impossible to have negative line-offsets. The code now considers negative values appropriately. (cherry picked from commit b90110d3e0420eed1e258f3178f2a89660cedefe) M +45 -26 libs/flake/text/KoSvgTextShape.cpp https://invent.kde.org/graphics/krita/-/commit/de2549670876392fb9c46dc1842245482a0bb428