- // Get the script for the character.
- Script script = GetScript( index,
- scriptRunIt,
- scriptRunEndIt );
+ CharacterIndex lastCharacter = startIndex + numberOfCharacters;
+ for(Length index = startIndex; index < lastCharacter; ++index)
+ {
+ // Get the current character.
+ const Character character = *(textBuffer + index);
+ bool isItalicRequired = false;
+ bool isBoldRequired = false;
+
+ // new description for current character
+ TextAbstraction::FontDescription currentFontDescription;
+ TextAbstraction::PointSize26Dot6 currentFontPointSize = defaultFontPointSize;
+ bool isDefaultFont = true;
+ MergeFontDescriptions(fontDescriptions,
+ defaultFontDescription,
+ defaultFontPointSize,
+ index,
+ currentFontDescription,
+ currentFontPointSize,
+ isDefaultFont);
+
+ // Get the font for the current character.
+ FontId fontId = fontClient.GetFontId(currentFontDescription, currentFontPointSize);
+
+ // Get the script for the current character.
+ Script script = GetScript(index,
+ scriptRunIt,
+ scriptRunEndIt);