// INTERNAL INCLUDES
#include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>
+#include <dali-toolkit/internal/text/glyph-metrics-helper.h>
#include <dali-toolkit/internal/text/rendering/view-model.h>
namespace Dali
TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
Length hyphenIndex = 0;
+ const Character* textBuffer = mModel->GetTextBuffer();
+ float calculatedAdvance = 0.f;
+ const Vector<CharacterIndex>& glyphToCharacterMap = mModel->GetGlyphsToCharacters();
+ const CharacterIndex* glyphToCharacterMapBuffer = glyphToCharacterMap.Begin();
+
// Traverses the lines of the text.
for(LineIndex lineIndex = 0u; lineIndex < modelNumberOfLines; ++lineIndex)
{
const Text::Underline::Type underlineType = mModel->GetUnderlineType();
const float dashedUnderlineWidth = mModel->GetDashedUnderlineWidth();
const float dashedUnderlineGap = mModel->GetDashedUnderlineGap();
-
- const bool strikethroughEnabled = mModel->IsStrikethroughEnabled();
- const Vector4& strikethroughColor = mModel->GetStrikethroughColor();
- const float strikethroughHeight = mModel->GetStrikethroughHeight();
+ const bool strikethroughEnabled = mModel->IsStrikethroughEnabled();
+ const Vector4& strikethroughColor = mModel->GetStrikethroughColor();
+ const float strikethroughHeight = mModel->GetStrikethroughHeight();
+ const float characterSpacing = mModel->GetCharacterSpacing();
// Get the underline runs.
const Length numberOfUnderlineRuns = mModel->GetNumberOfUnderlineRuns();
if(addHyphen)
{
GlyphInfo tempInfo = *(glyphsBuffer + elidedGlyphIndex);
- position.x = position.x + tempInfo.advance - tempInfo.xBearing + glyphInfo->xBearing;
+ calculatedAdvance = GetCalculatedAdvance(*(textBuffer + (*(glyphToCharacterMapBuffer + elidedGlyphIndex))), characterSpacing, tempInfo.advance);
+ position.x = position.x + calculatedAdvance - tempInfo.xBearing + glyphInfo->xBearing;
position.y = -glyphInfo->yBearing;
}