Created attachment 193581 [details] ex units The attached SVG has this markup: <text x="5" y="20" style="font-size:16px;font-family:Liberation Sans">foo <tspan x="5" dy="3ex" style="font-size:1ex">bar</tspan></text> It sets the outer (text's) font-size to 16px, then in the inner tspan, it sets the font-size to 1ex, and dy to 3ex. According to spec, the font-size value of the tspan must be calculated as 1 x-height of the first available font with inherited font-size, with a fallback to 0.5em (i.e., roughly half of 16px). When opening the SVG in a browser (e.g., Chrome), the second line "bar" is rendered with a smaller size than the first line. In Draw, the second line is incorrectly rendered using the same font size as the first line.
Reproduced in Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: f3d0a184c4da57907a1fcf1ed784340be7d974d6 CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3 Locale: es-ES (es_ES.UTF-8); UI: en-US Calc: threaded
https://gerrit.libreoffice.org/c/core/+/166234
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/86a8a3a43b642fc13bae6a89720496285f8f73d7 tdf#160594: Use the recommended fallback of 0.5em for ex in font-size It will be available in 24.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/97586e0b4712e44e360e6572af8483d81ac2346a tdf#160594: Use the recommended fallback of 0.5em for ex in font-size It will be available in 24.2.4. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Verified in Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 8df17c340193c89549d8c563b04d015156afa3fb CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3 Locale: es-ES (es_ES.UTF-8); UI: en-US Calc: threaded @Mike, thanks for fixing the issue!!
Created attachment 194593 [details] tdf#160594 SVG import wrong calculation of tspan's font-size using ex LO7.6.5 vs LO24.2.4.png Version: 24.2.4.2 (X86_64) / LibreOffice Community Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2 CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win Locale: pl-PL (pl_PL); UI: en-US Calc: threaded Confirm: it's fixed now.