Created attachment 193580 [details] dy in em's The attached SVG has this markup: <text x="5" y="20" style="font-size:16px;font-family:Liberation Sans">foo <tspan x="5" dy="1.5em" style="font-size:0.5em">bar</tspan></text> It sets the outer (text's) font-size to 16px, then in the inner tspan, it sets the font-size to 0.5em, and dy to 1.5em. According to spec, the font-size value of the tspan must be calculated as half of its inherited font-size (i.e., half of 16px); and in all other places inside tspan (e.g., in the dy), the em must refer to the current tspan's font-size (8px). When opening the SVG in a browser (e.g., Chrome), the second line "bar" is rendered much closer to the first line, than in Draw.
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/+/166233
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/e27572686130df43d1d65c574b0c34f39fc0d1a9 tdf#160593: make sure to use current element's font size for em unit 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/334446935b194ebdadb10004c01bff550f09838e tdf#160593: make sure to use current element's font size for em unit 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 194592 [details] tdf#160593 SVG import wrong calculation of tspan's dy using em LO7.6.5 vs LO24.2.4 and Firefox zoom 30% & 500% span between lines 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 It seems to be fixed. But why is this file zoom-dependent in Firefox? Is this the bad behavior of FF or LO? How this SVG image should be rendered?
(In reply to Piotr Osada from comment #6) > But why is this file zoom-dependent in Firefox? Is this the bad behavior of > FF or LO? How this SVG image should be rendered? How a behavior of FF displaying an SVG could possibly be a "bad behavior of LO"? Have you tested using other browsers / SVG readers?
Sorry,(In reply to Mike Kaganski from comment #7) > How a behavior of FF displaying an SVG could possibly be a "bad behavior of > LO"? Have you tested using other browsers / SVG readers? Sorry, this is only in FF. Chrome and Edge displays this SVG in the same way as LO after the fix.