diff --git a/scribus/pageitem_textframe.cpp b/scribus/pageitem_textframe.cpp index 2779ec9dd..6209a2fb6 100644 --- a/scribus/pageitem_textframe.cpp +++ b/scribus/pageitem_textframe.cpp @@ -1673,6 +1673,14 @@ void PageItem_TextFrame::layout() else current.glyphs[currentIndex].clearFlag(ScLayout_StartOfLine); + if (!current.glyphs[currentIndex].hasFlag(ScLayout_StartOfLine)) + { + double tracking = charStyle.fontSize() * charStyle.tracking() / 10000.0; + current.glyphs[currentIndex].addToXOffset(tracking); + if (current.glyphs[currentIndex].width() != 0) + current.glyphs[currentIndex].setExtraWidth(tracking); + } + // glyphs->yadvance = 0; if (i == current.line.firstRun && current.glyphs[currentIndex].hasFlag(ScLayout_CJKFence)) diff --git a/scribus/text/textshaper.cpp b/scribus/text/textshaper.cpp index 43e1c8f28..468443e31 100644 --- a/scribus/text/textshaper.cpp +++ b/scribus/text/textshaper.cpp @@ -444,11 +444,6 @@ QList TextShaper::shape() if (m_story.hasObject(firstChar)) gl.xadvance = m_story.object(firstChar)->width() + m_story.object(firstChar)->lineWidth(); - double tracking = 0; - if (!(flags & ScLayout_StartOfLine)) - tracking = style.fontSize() * style.tracking() / 10000.0; - gl.xoffset += tracking; - if ((effects & ScStyle_Superscript) || (effects & ScStyle_Subscript)) { double scale; @@ -481,9 +476,6 @@ QList TextShaper::shape() run.setScaleH(1.0); } - if (gl.xadvance > 0) - gl.xadvance += tracking; - run.append(gl); lastGlyph = ≷ i++;