// INTERNAL INCLUDES
#include <dali-toolkit/internal/text/bounded-paragraph-run.h>
#include <dali-toolkit/internal/text/markup-processor-helper-functions.h>
+#include <dali-toolkit/internal/text/markup-tags-and-attributes.h>
namespace Dali
{
{
namespace Text
{
-namespace
-{
-const std::string XHTML_ALIGN_ATTRIBUTE("align");
-}
-
void ProcessHorizontalAlignment(const Attribute& attribute, BoundedParagraphRun& boundedParagraphRun)
{
boundedParagraphRun.horizontalAlignmentDefined = HorizontalAlignmentTypeStringToTypeValue(attribute.valueBuffer,
boundedParagraphRun.horizontalAlignment);
}
+void ProcessRelativeLineHeight(const Attribute& attribute, BoundedParagraphRun& boundedParagraphRun)
+{
+ boundedParagraphRun.relativeLineSize = StringToFloat(attribute.valueBuffer);
+ boundedParagraphRun.relativeLineSizeDefined = true;
+}
+
void ProcessAttributesOfParagraphTag(const Tag& tag, BoundedParagraphRun& boundedParagraphRun)
{
// By default the align attribute is not defined until it's parsed.
++it)
{
const Attribute& attribute(*it);
- if(TokenComparison(XHTML_ALIGN_ATTRIBUTE, attribute.nameBuffer, attribute.nameLength))
+ if(TokenComparison(MARKUP::PARAGRAPH_ATTRIBUTES::ALIGN, attribute.nameBuffer, attribute.nameLength))
{
ProcessHorizontalAlignment(attribute, boundedParagraphRun);
}
+ else if(TokenComparison(MARKUP::PARAGRAPH_ATTRIBUTES::RELATIVE_LINE_HEIGHT, attribute.nameBuffer, attribute.nameLength))
+ {
+ ProcessRelativeLineHeight(attribute, boundedParagraphRun);
+ }
}
}
-
} // namespace Text
} // namespace Toolkit