1. Open Writer on Linux 2. Insert attachment 179090 [details] from bug 148167 as an image Compare to screenshot of "Firefox (top) vs LibreOffice 7.4 (bottom)", attachment 179100 [details] Bibisected with linux-64-25.2 to bf3cd8e50f886084500e3a8ff72ff4ffab05ddd7 CairoSDPR: Make using SDPR dependent of ExperimentalMode Arch Linux 64-bit Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 1313be884c4ded639a5f53694c82a1cf2e77fe70 CPU threads: 8; OS: Linux 6.15; UI render: default; VCL: kf6 (cairo+wayland) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: CL threaded Built on 12 August 2025
Reproduced in Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: f3522ba36c867f4eb69fabcf293419f1d69caffa CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3 Locale: es-ES (es_ES.UTF-8); UI: en-US Calc: threaded
Using TEST_SYSTEM_PRIMITIVE_RENDERER=1 I bisected it further to ff46c8bf598481ae37022414f3495c1e9385eb7c
Also in Draw, so created simple test doc. Using DISABLE_SYSTEM_DEPENDENT_PRIMITIVE_RENDERER shows it has to do with CairoSDPR - strange since SVG import is not different, so same TextPrimitives create different renderings -> have to check...
Seems to have to do with TextSimplePortionPrimitive2D's having no DxArray, the current stuff works in ObjectCoordinates then and that are small doubles, so also some old int/rounding involved i fear...
Created attachment 202383 [details] ReducedBugDoc using draw (simpler) and SVG stripped to one text
After some experimenting I identified the basic problem: In GenericSalLayout::LayoutText:821 we have if (!GetSubpixelPositioning()) { nAdvance = std::round(nAdvance); nXOffset = std::round(nXOffset); nYOffset = std::round(nYOffset); } and thus the *correctly* created DXArray values which are in logical object coordinates for the text (0..1) get killed. As can be seen that does not happen when GetSubpixelPositioning is active. that again depends on code in OutputDevice::ImplLayout, see if (pSalLayout) pSalLayout->SetSubpixelPositioning(mbMap); where mbMap is bool IsMapModeEnabled() const { return mbMap; } which is not the case for the OutDev (ImpTimedRefDev) used in TextLayouterDevice. Just setting it does not help - unfortunately, so have to check how I can get SubpixelPositioning to the needed places...
Solution on gerrit , see https://gerrit.libreoffice.org/c/core/+/189993
Had to change, the 1st solution stopped working, see comments and new solution in https://gerrit.libreoffice.org/c/core/+/189993
Armin Le Grand (collabora) committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/ba462658d955b6d7909f9ffbdfd341f18aff2028 tdf#168002 CairoSDPR breaks SVG text layout It will be available in 26.2.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.
Fix verified. Arch Linux 64-bit Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 554aa00b556dfc461ea32ebcb8abd98061629599 CPU threads: 8; OS: Linux 6.16; UI render: default; VCL: kf6 (cairo+wayland) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: CL threaded Built on 26 August 2025
Armin Le Grand (collabora) committed a patch related to this issue. It has been pushed to "libreoffice-25-8": https://git.libreoffice.org/core/commit/e4ec4aa609e5a67ec5e3301822d79d90faec30e4 tdf#168002 CairoSDPR breaks SVG text layout It will be available in 25.8.2. 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.