vcl/source/outdev/text.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 3769508f4952ca54cad7e9d33f4113b0d18066c9 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Dec 14 21:27:14 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Dec 15 10:19:57 2021 +0100 tdf#145934 workaround rounding causing 'dancing characters' Change-Id: I1fb260196beb0cc54232aa60a1191d3090fa31b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126848 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 8fb3a2c87118..a28dc49e5ebd 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -1348,10 +1348,10 @@ std::unique_ptr<SalLayout> OutputDevice::ImplLayout(const OUString& rOrigStr, xDXPixelArray.reset(new DeviceCoordinate[nLen]); pDXPixelArray = xDXPixelArray.get(); // using base position for better rounding a.k.a. "dancing characters" - DeviceCoordinate nPixelXOfs = LogicWidthToDeviceCoordinate( rLogicalPos.X() ); + DeviceCoordinate nPixelXOfs2 = LogicWidthToDeviceCoordinate(rLogicalPos.X() * 2); for( int i = 0; i < nLen; ++i ) { - pDXPixelArray[i] = LogicWidthToDeviceCoordinate( rLogicalPos.X() + pDXArray[i] ) - nPixelXOfs; + pDXPixelArray[i] = (LogicWidthToDeviceCoordinate((rLogicalPos.X() + pDXArray[i]) * 2) - nPixelXOfs2) / 2; } } else