+ Tag tag;
+ CharacterIndex characterIndex = 0u;
+ for(; markupStringBuffer < markupStringEndBuffer;)
+ {
+ tag.attributes.Clear();
+ if(IsTag(markupStringBuffer,
+ markupStringEndBuffer,
+ tag))
+ {
+ if(TokenComparison(XHTML_COLOR_TAG, tag.buffer, tag.length))
+ {
+ ProcessTagForRun<ColorRun>(
+ markupProcessData.colorRuns, styleStack, tag, characterIndex, colorRunIndex, colorTagReference, [](const Tag& tag, ColorRun& run) { ProcessColorTag(tag, run); });
+ } // <color></color>
+ else if(TokenComparison(XHTML_I_TAG, tag.buffer, tag.length))
+ {
+ ProcessTagForRun<FontDescriptionRun>(
+ markupProcessData.fontRuns, styleStack, tag, characterIndex, fontRunIndex, iTagReference, [](const Tag&, FontDescriptionRun& fontRun) {
+ fontRun.slant = TextAbstraction::FontSlant::ITALIC;
+ fontRun.slantDefined = true;
+ });
+ } // <i></i>
+ else if(TokenComparison(XHTML_U_TAG, tag.buffer, tag.length))
+ {
+ ProcessTagForRun<UnderlinedCharacterRun>(
+ markupProcessData.underlinedCharacterRuns, styleStack, tag, characterIndex, underlinedCharacterRunIndex, uTagReference, [](const Tag& tag, UnderlinedCharacterRun& run) {});
+ } // <u></u>
+ else if(TokenComparison(XHTML_B_TAG, tag.buffer, tag.length))
+ {
+ ProcessTagForRun<FontDescriptionRun>(
+ markupProcessData.fontRuns, styleStack, tag, characterIndex, fontRunIndex, bTagReference, [](const Tag&, FontDescriptionRun& fontRun) {
+ fontRun.weight = TextAbstraction::FontWeight::BOLD;
+ fontRun.weightDefined = true;
+ });
+ } // <b></b>
+ else if(TokenComparison(XHTML_FONT_TAG, tag.buffer, tag.length))
+ {
+ ProcessTagForRun<FontDescriptionRun>(
+ markupProcessData.fontRuns, styleStack, tag, characterIndex, fontRunIndex, fontTagReference, [](const Tag& tag, FontDescriptionRun& fontRun) { ProcessFontTag(tag, fontRun); });
+ } // <font></font>
+ else if(TokenComparison(XHTML_ANCHOR_TAG, tag.buffer, tag.length))
+ {
+ /* Anchor */
+ ProcessAnchorTag(markupProcessData, tag, characterIndex);
+ /* Color */
+ ProcessTagForRun<ColorRun>(
+ markupProcessData.colorRuns, styleStack, tag, characterIndex, colorRunIndex, colorTagReference, [](const Tag& tag, ColorRun& run) {
+ run.color = Color::BLUE;
+ ProcessColorTag(tag, run);
+ });
+ /* TODO - underline */
+ } // <a href=https://www.tizen.org>tizen</a>
+ else if(TokenComparison(XHTML_SHADOW_TAG, tag.buffer, tag.length))
+ {
+ // TODO: If !tag.isEndTag, then create a new shadow run.
+ // else Pop the top of the stack and set the number of characters of the run.
+ } // <shadow></shadow>
+ else if(TokenComparison(XHTML_GLOW_TAG, tag.buffer, tag.length))
+ {
+ // TODO: If !tag.isEndTag, then create a new glow run.
+ // else Pop the top of the stack and set the number of characters of the run.
+ } // <glow></glow>
+ else if(TokenComparison(XHTML_OUTLINE_TAG, tag.buffer, tag.length))
+ {
+ // TODO: If !tag.isEndTag, then create a new outline run.
+ // else Pop the top of the stack and set the number of characters of the run.
+ } // <outline></outline>
+ else if(TokenComparison(XHTML_ITEM_TAG, tag.buffer, tag.length))
+ {
+ ProcessItemTag(markupProcessData, tag, characterIndex);
+ }
+ else if(TokenComparison(XHTML_BACKGROUND_TAG, tag.buffer, tag.length))
+ {
+ ProcessTagForRun<ColorRun>(
+ markupProcessData.backgroundColorRuns, styleStack, tag, characterIndex, backgroundRunIndex, backgroundTagReference, [](const Tag& tag, ColorRun& run) { ProcessBackground(tag, run); });
+ }
+ else if(TokenComparison(XHTML_SPAN_TAG, tag.buffer, tag.length))
+ {
+ ProcessSpanForRun(tag, spanStack, markupProcessData.colorRuns, markupProcessData.fontRuns, colorRunIndex, fontRunIndex, characterIndex, spanTagReference);
+ }
+ } // end if( IsTag() )
+ else if(markupStringBuffer < markupStringEndBuffer)