X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fmarkup-processor-span.cpp;h=19810ee240857703dad85546c05be712c124f380;hb=702cdc29b907688eef62afbc63f0edb9e2dfb7d2;hp=1b3cdc23374471c36dd5d4fa1d36ae98042b04e4;hpb=8ef941787d6c53b99d72ab3cef4a55ae1d9e7e6d;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/markup-processor-span.cpp b/dali-toolkit/internal/text/markup-processor-span.cpp index 1b3cdc2..19810ee 100644 --- a/dali-toolkit/internal/text/markup-processor-span.cpp +++ b/dali-toolkit/internal/text/markup-processor-span.cpp @@ -24,6 +24,7 @@ // INTERNAL INCLUDES #include #include +#include #include #include #include @@ -57,20 +58,26 @@ const std::string XHTML_UNDERLINE_DASH_WIDTH_ATTRIBUTE("u-dash-width"); const std::string XHTML_STRIKETHROUGH_COLOR_ATTRIBUTE("s-color"); const std::string XHTML_STRIKETHROUGH_HEIGHT_ATTRIBUTE("s-height"); -} // namespace +//the character-spacing character's attributes +const std::string XHTML_CHARACTER_SPACING_VALUE_ATTRIBUTE("char-space-value"); + +//NOTE: the MAX_NUM_OF_ATTRIBUTES in "markup-processor.cpp" should be updated when add a new attribute for span tag. -void ProcessSpanTag(const Tag& tag, - ColorRun& colorRun, - FontDescriptionRun& fontRun, - UnderlinedCharacterRun& underlinedCharacterRun, - ColorRun& backgroundColorRun, - StrikethroughCharacterRun& strikethroughRun, - bool& isColorDefined, - bool& isFontDefined, - bool& isUnderlinedCharacterDefined, - bool& isBackgroundColorDefined, - bool& isStrikethroughDefined) +} // namespace +void ProcessSpanTag(const Tag& tag, + ColorRun& colorRun, + FontDescriptionRun& fontRun, + UnderlinedCharacterRun& underlinedCharacterRun, + ColorRun& backgroundColorRun, + StrikethroughCharacterRun& strikethroughRun, + CharacterSpacingCharacterRun& characterSpacingCharacterRun, + bool& isColorDefined, + bool& isFontDefined, + bool& isUnderlinedCharacterDefined, + bool& isBackgroundColorDefined, + bool& isStrikethroughDefined, + bool& isCharacterSpacingDefined) { for(Vector::ConstIterator it = tag.attributes.Begin(), endIt = tag.attributes.End(); @@ -149,6 +156,11 @@ void ProcessSpanTag(const Tag& tag, isStrikethroughDefined = true; ProcessHeightAttribute(attribute, strikethroughRun); } + else if(TokenComparison(XHTML_CHARACTER_SPACING_VALUE_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + { + isCharacterSpacingDefined = true; + ProcessValueAttribute(attribute, characterSpacingCharacterRun); + } } }