Kaydet (Commit) 9eb4b14f authored tarafından Khaled Hosny's avatar Khaled Hosny

tdf#103765: Round positions instead of truncating

Change-Id: Id0505163e10bb4c76970f2f96af568da453d3d05
Reviewed-on: https://gerrit.libreoffice.org/32211Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 2e9c02fe
...@@ -615,9 +615,9 @@ bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs) ...@@ -615,9 +615,9 @@ bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs)
nYOffset = -pHbPositions[i].y_offset; nYOffset = -pHbPositions[i].y_offset;
} }
nAdvance *= nXScale; nAdvance = std::lround(nAdvance * nXScale);
nXOffset *= nXScale; nXOffset = std::lround(nXOffset * nXScale);
nYOffset *= nYScale; nYOffset = std::lround(nXOffset * nYScale);
Point aNewPos(aCurrPos.X() + nXOffset, aCurrPos.Y() + nYOffset); Point aNewPos(aCurrPos.X() + nXOffset, aCurrPos.Y() + nYOffset);
const GlyphItem aGI(nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, const GlyphItem aGI(nCharPos, nGlyphIndex, aNewPos, nGlyphFlags,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment