X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Ftext%2Ftext-controller.cpp;h=6fe0f33832bfd9c0f4d5bc90204112cbf65dba87;hb=refs%2Fchanges%2F95%2F35495%2F4;hp=a5763d580a2ef85ec8d49a5d03f7ba725a850c5c;hpb=306d2f61a1b64179e801fa8a0bb2bd7b4e9dd682;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/text/text-controller.cpp b/dali-toolkit/public-api/text/text-controller.cpp index a5763d5..6fe0f33 100644 --- a/dali-toolkit/public-api/text/text-controller.cpp +++ b/dali-toolkit/public-api/text/text-controller.cpp @@ -25,6 +25,8 @@ #include #include #include +#include +#include #include #include @@ -91,9 +93,23 @@ bool Controller::Relayout( const Vector2& size ) const uint8_t* utf8 = reinterpret_cast( text.c_str() ); Length characterCount = Utf8ToUtf32( utf8, text.size(), &utf32Characters[0] ); + utf32Characters.Resize( characterCount ); + + Vector scripts; + MultilanguageSupport multilanguageSupport = MultilanguageSupport::Get(); + + multilanguageSupport.SetScripts( utf32Characters, + scripts ); + + Vector fonts; + multilanguageSupport.ValidateFonts( utf32Characters, + scripts, + fonts ); // Manipulate the logical model mImpl->mLogicalModel->SetText( &utf32Characters[0], characterCount ); + mImpl->mLogicalModel->SetScripts( &scripts[0], scripts.Count() ); + mImpl->mLogicalModel->SetFonts( &fonts[0], fonts.Count() ); // Update the visual model mImpl->mLayoutEngine.UpdateVisualModel( size, *mImpl->mLogicalModel, *mImpl->mVisualModel );