X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fmarkup-processor-font.cpp;h=802f9e9f26f7790ba44f9dc070d0b8f06d2c662f;hp=0c469b8fb0a7c981651824486e7140429f44a05d;hb=8e129c82c96ccd93fa92d64cc1deddfe6eb3cfbb;hpb=11ac31ab089b6b0d6cb8b06381724ac8c0ce126e diff --git a/dali-toolkit/internal/text/markup-processor-font.cpp b/dali-toolkit/internal/text/markup-processor-font.cpp index 0c469b8..802f9e9 100644 --- a/dali-toolkit/internal/text/markup-processor-font.cpp +++ b/dali-toolkit/internal/text/markup-processor-font.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include namespace Dali @@ -36,12 +37,6 @@ namespace Text { namespace { -const std::string XHTML_FAMILY_ATTRIBUTE("family"); -const std::string XHTML_SIZE_ATTRIBUTE("size"); -const std::string XHTML_WEIGHT_ATTRIBUTE("weight"); -const std::string XHTML_WIDTH_ATTRIBUTE("width"); -const std::string XHTML_SLANT_ATTRIBUTE("slant"); - const std::string FONT_PREFIX("font-"); const unsigned int FONT_PREFIX_LENGTH = 5u; const unsigned int MIN_FONT_ATTRIBUTE_SIZE = 4u; ///< The minimum length of any of the possible 'weight', 'width' , 'slant' or 'size' values. @@ -97,23 +92,23 @@ void ProcessFontTag(const Tag& tag, FontDescriptionRun& fontRun) { const Attribute& attribute(*it); - if(TokenComparison(XHTML_FAMILY_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + if(TokenComparison(MARKUP::FONT_ATTRIBUTES::FAMILY, attribute.nameBuffer, attribute.nameLength)) { ProcessFontFamily(attribute, fontRun); } - else if(TokenComparison(XHTML_SIZE_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + else if(TokenComparison(MARKUP::FONT_ATTRIBUTES::SIZE, attribute.nameBuffer, attribute.nameLength)) { ProcessFontSize(attribute, fontRun); } - else if(TokenComparison(XHTML_WEIGHT_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + else if(TokenComparison(MARKUP::FONT_ATTRIBUTES::WEIGHT, attribute.nameBuffer, attribute.nameLength)) { ProcessFontWeight(attribute, fontRun); } - else if(TokenComparison(XHTML_WIDTH_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + else if(TokenComparison(MARKUP::FONT_ATTRIBUTES::WIDTH, attribute.nameBuffer, attribute.nameLength)) { ProcessFontWidth(attribute, fontRun); } - else if(TokenComparison(XHTML_SLANT_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength)) + else if(TokenComparison(MARKUP::FONT_ATTRIBUTES::SLANT, attribute.nameBuffer, attribute.nameLength)) { ProcessFontSlant(attribute, fontRun); }