summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2021-05-13 23:57:31 +0800
committerMark Hung <marklh9@gmail.com>2021-05-28 07:03:53 +0200
commit8a65d3e9ceb268f785c5b2b77e126bd62af567a3 (patch)
tree75b85d4402408391fcfcb856dfd122cde4615809 /vcl
parent187136265d26c014e842550c2f1fc5997736e4fa (diff)
vcl: handle fallback glyph offset for vertical writing.
When GenericSalLayout::MoveGlyph() is called from MultiSalLayout::AdjustLayout(), new position is calculatd by adding glyph advances ( i.e. glyph items' m_nNewWidth ). To move the glyph, the moving offset should be calculated based on the corresponding position, i.e. m_nXOffset v.s. m_LinearPos.X(). Change-Id: I912d499f49f69f68d8388bc8677e6b47bfb6f066 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115926 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/sallayout.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index cde5cac31730..9f4757148b36 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -949,7 +949,7 @@ void GenericSalLayout::MoveGlyph( int nStart, tools::Long nNewXPos )
if( pGlyphIter->IsRTLGlyph() )
nNewXPos += pGlyphIter->m_nNewWidth - pGlyphIter->origWidth();
// calculate the x-offset to the old position
- tools::Long nXDelta = nNewXPos - pGlyphIter->m_aLinearPos.getX();
+ tools::Long nXDelta = nNewXPos - pGlyphIter->m_aLinearPos.getX() + pGlyphIter->xOffset();
// adjust all following glyph positions if needed
if( nXDelta != 0 )
{