X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Flayouts%2Flayout-engine.cpp;h=01a57868f488dc55c9404d4ed518dfa17575e188;hp=e75009d474ca00de3e035e91fc003c21cfc86b34;hb=db486aa2b45e86d175dce690989b604799ccc8a1;hpb=3210135f64a01d4b23051099efe7455a286a9e7a diff --git a/dali-toolkit/internal/text/layouts/layout-engine.cpp b/dali-toolkit/internal/text/layouts/layout-engine.cpp index e75009d..01a5786 100644 --- a/dali-toolkit/internal/text/layouts/layout-engine.cpp +++ b/dali-toolkit/internal/text/layouts/layout-engine.cpp @@ -229,6 +229,14 @@ struct LayoutEngine::Impl // Get the glyph info. const GlyphInfo& glyphInfo = *( parameters.glyphsBuffer + glyphIndex ); + // Check if the font of the current glyph is the same of the previous one. + // If it's different the ascender and descender need to be updated. + if( lastFontId != glyphInfo.fontId ) + { + UpdateLineHeight( glyphInfo.fontId, tmpLineLayout ); + lastFontId = glyphInfo.fontId; + } + // Get the character indices for the current glyph. The last character index is needed // because there are glyphs formed by more than one character but their break info is // given only for the last character. @@ -421,14 +429,6 @@ struct LayoutEngine::Impl tmpLineLayout.Clear(); } - // Check if the font of the current glyph is the same of the previous one. - // If it's different the ascender and descender need to be updated. - if( lastFontId != glyphInfo.fontId ) - { - UpdateLineHeight( glyphInfo.fontId, tmpLineLayout ); - lastFontId = glyphInfo.fontId; - } - previousCharacterDirection = characterDirection; }