- // The line height is the addition of the line ascender and the line descender.
- // However, the line descender has a negative value, hence the subtraction.
- cursorInfo.lineHeight = newLine.ascender - newLine.descender;
+ cursorInfo.lineHeight = GetLineHeight(newLine);
+
+ index = 0u;
+ const Length totalNumberOfCharacters = parameters.logicalModel->mText.Count();
+ if(totalNumberOfCharacters > 0u)
+ {
+ index = totalNumberOfCharacters - 1u;
+ }
+
+ GetGlyphMetricsFromCharacterIndex(index, glyphInfoBuffer, charactersToGlyphBuffer, glyphsPerCharacterBuffer, metrics, glyphMetrics, glyphIndex, numberOfGlyphs);