X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-io.cpp;h=f90822ecd369b7c79b4fd375bd9c622556617ea6;hp=3bc1761fe4e24d5b5dd6374ebe27bc228f774892;hb=HEAD;hpb=7aa9e3d716396348b89c913b306bbc1ce201db69 diff --git a/dali-toolkit/internal/text/text-io.cpp b/dali-toolkit/internal/text/text-io.cpp index 3bc1761..f90822e 100644 --- a/dali-toolkit/internal/text/text-io.cpp +++ b/dali-toolkit/internal/text/text-io.cpp @@ -19,27 +19,24 @@ #include // EXTERNAL INCLUDES +#include +#include #include -#include -#include namespace Dali { - namespace Toolkit { - namespace Text { - -std::ostream& operator<< (std::ostream& o, const Vector& text) +std::ostream& operator<<(std::ostream& o, const Vector& text) { o << std::hex; - for( unsigned int i=0; i& text) return o << std::dec; } -std::ostream& operator<< (std::ostream& o, const Vector& scriptRun) +std::ostream& operator<<(std::ostream& o, const Vector& scriptRun) { - for( unsigned int i=0; i9: LATIN" for a ten character run staring from beginning of the model - o << scriptRun[i].characterRun.characterIndex << "->" << (scriptRun[i].characterRun.characterIndex + scriptRun[i].characterRun.numberOfCharacters ) << ": "; + o << scriptRun[i].characterRun.characterIndex << "->" << (scriptRun[i].characterRun.characterIndex + scriptRun[i].characterRun.numberOfCharacters) << ": "; o << TextAbstraction::ScriptName[scriptRun[i].script]; - if( i+1 < scriptRun.Count() ) + if(i + 1 < scriptRun.Count()) { o << ", "; } @@ -65,21 +62,21 @@ std::ostream& operator<< (std::ostream& o, const Vector& scriptRun) return o << std::dec; } -std::ostream& operator<< (std::ostream& o, const Vector& fontRun) +std::ostream& operator<<(std::ostream& o, const Vector& fontRun) { TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get(); - for( unsigned int i=0; i9: ID:1 TizenSansKorean style:Regular size:10.0" for a ten character run staring from beginning of the model - o << fontRun[i].characterRun.characterIndex << "->" << (fontRun[i].characterRun.characterIndex + fontRun[i].characterRun.numberOfCharacters ) << ": "; + o << fontRun[i].characterRun.characterIndex << "->" << (fontRun[i].characterRun.characterIndex + fontRun[i].characterRun.numberOfCharacters) << ": "; - FontId id = fontRun[i].fontId; + FontId id = fontRun[i].fontId; TextAbstraction::FontDescription fontDescription; - fontClient.GetDescription( id, fontDescription ); - o << "ID:" << id << ", " << fontDescription.family << " style:" << fontDescription.style << " size:" << (fontClient.GetPointSize(id) / 64); + fontClient.GetDescription(id, fontDescription); + o << "ID:" << id << ", " << fontDescription.family << " width: " << fontDescription.width << " weight: " << fontDescription.weight << " slant: " << fontDescription.slant << " size:" << (fontClient.GetPointSize(id) / 64); - if( i+1 < fontRun.Count() ) + if(i + 1 < fontRun.Count()) { o << ", "; } @@ -88,18 +85,18 @@ std::ostream& operator<< (std::ostream& o, const Vector& fontRun) return o << std::dec; } -std::ostream& operator<< (std::ostream& o, const Vector& lineRuns) +std::ostream& operator<<(std::ostream& o, const Vector& lineRuns) { - for( unsigned int i=0; i9 Characters: 0->9 (10)" for a ten character run staring from beginning of the model - o << "Line " << i << " Glyphs: " << lineRuns[i].glyphIndex << "->" << (lineRuns[i].glyphIndex + lineRuns[i].numberOfGlyphs ); - o << " Characters: " << lineRuns[i].characterRun.characterIndex << "->" << (lineRuns[i].characterRun.characterIndex + lineRuns[i].characterRun.numberOfCharacters ); + o << "Line " << i << " Glyphs: " << lineRuns[i].glyphRun.glyphIndex << "->" << (lineRuns[i].glyphRun.glyphIndex + lineRuns[i].glyphRun.numberOfGlyphs); + o << " Characters: " << lineRuns[i].characterRun.characterIndex << "->" << (lineRuns[i].characterRun.characterIndex + lineRuns[i].characterRun.numberOfCharacters); o << " Width: " << lineRuns[i].width; o << " Ascender: " << lineRuns[i].ascender; o << " Descender: " << lineRuns[i].descender; - if( i+1 < lineRuns.Count() ) + if(i + 1 < lineRuns.Count()) { o << ", "; }