+ //To handle START case of ellipsis, the first glyph has been shifted
+ //glyphIndex represent indices in whole glyphs but elidedGlyphIndex represents indices in elided Glyphs
+ GlyphIndex elidedGlyphIndex = glyphIndex - startIndexOfGlyphs;
+
+ //To handle MIDDLE case of ellipsis, the first glyph in the second half of line has been shifted and skip the removed glyph from middle.
+ if(ellipsisPosition == DevelText::EllipsisPosition::MIDDLE)
+ {
+ if(glyphIndex > firstMiddleIndexOfElidedGlyphs &&
+ glyphIndex < secondMiddleIndexOfElidedGlyphs)
+ {
+ // Ignore any glyph that removed for MIDDLE ellipsis
+ continue;
+ }
+ if(glyphIndex >= secondMiddleIndexOfElidedGlyphs)
+ {
+ elidedGlyphIndex -= (secondMiddleIndexOfElidedGlyphs - firstMiddleIndexOfElidedGlyphs - 1u);
+ }
+ }
+