diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2016-12-20 01:36:34 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-12-20 09:24:15 +0000 |
commit | 5e63617ef934d3602bbc22f0f01c77b024347e60 (patch) | |
tree | 1a8e7cf806974ea64be5b61101aaafcdcf266b62 /vcl | |
parent | ce758326191d66520ecba94c8a62a98dcfa3846b (diff) |
tdf#103765: Round positions instead of truncating
Change-Id: Id0505163e10bb4c76970f2f96af568da453d3d05
Reviewed-on: https://gerrit.libreoffice.org/32211
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
(cherry picked from commit 9eb4b14ffa57cd7bbdf0fc43096f5f1e65c8e388)
Reviewed-on: https://gerrit.libreoffice.org/32212
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/CommonSalLayout.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx index 521d17806f9e..1be067324df4 100644 --- a/vcl/source/gdi/CommonSalLayout.cxx +++ b/vcl/source/gdi/CommonSalLayout.cxx @@ -635,9 +635,9 @@ bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs) nYOffset = -pHbPositions[i].y_offset; } - nAdvance *= nXScale; - nXOffset *= nXScale; - nYOffset *= nYScale; + nAdvance = std::lround(nAdvance * nXScale); + nXOffset = std::lround(nXOffset * nXScale); + nYOffset = std::lround(nXOffset * nYScale); Point aNewPos(aCurrPos.X() + nXOffset, aCurrPos.Y() + nYOffset); const GlyphItem aGI(nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, |