diff options
author | Mark Hung <marklh9@gmail.com> | 2017-04-20 23:40:50 +0800 |
---|---|---|
committer | Mark Hung <marklh9@gmail.com> | 2017-04-23 08:00:57 +0200 |
commit | 5f62b97ae7891b8c601f6093a1ec5358feb20790 (patch) | |
tree | afb826ef34117cd008ce8fcd09cf2a2e507622d5 | |
parent | e0c7b254c0b941cf55a2d4a80de981748c3bfe7c (diff) |
tdf#107301: Improve non snap-to-char text rendering.
DrawText ingnores calculated KernArray so the text is cluttered,
use DrawTextArray instead of DrawText.
Change-Id: I9f7294cd6540257034ac7fcffdaff5b4f2529d8f
Reviewed-on: https://gerrit.libreoffice.org/36751
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
-rw-r--r-- | sw/source/core/txtnode/fntcache.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 03c201afb29e..ec43a811c485 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -1133,16 +1133,16 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) { nSpaceSum += nSpaceAdd; if( j < i) - rInf.GetOut().DrawText( aTmpPos, rInf.GetText(), - rInf.GetIdx() + j, i - j ); + rInf.GetOut().DrawTextArray( aTmpPos, rInf.GetText(), + pKernArray.get() + j, rInf.GetIdx() + j, i - j ); j = i + 1; pKernArray[i] = pKernArray[i] + nSpaceSum; aTmpPos.X() = aTextOriginPos.X() + pKernArray[ i ] + nKernSum; } } if( j < i ) - rInf.GetOut().DrawText( aTmpPos, rInf.GetText(), - rInf.GetIdx() +j , i - j ); + rInf.GetOut().DrawTextArray( aTmpPos, rInf.GetText(), + pKernArray.get() + j, rInf.GetIdx() +j , i - j ); } } } |