+ // Retrieve the glyphs and the glyph to character conversion map.
+ Vector<GlyphInfo> tmpGlyphs;
+ Vector<CharacterIndex> tmpGlyphToCharacterMap;
+ tmpGlyphs.Resize( numberOfGlyphs );
+ tmpGlyphToCharacterMap.Resize( numberOfGlyphs );
+ shaping.GetGlyphs( tmpGlyphs.Begin(),
+ tmpGlyphToCharacterMap.Begin() );
+
+ // Update the new indices of the glyph to character map.
+ if( 0u != totalNumberOfGlyphs )
+ {
+ for( Vector<CharacterIndex>::Iterator it = tmpGlyphToCharacterMap.Begin(),
+ endIt = tmpGlyphToCharacterMap.End();
+ it != endIt;
+ ++it )
+ {
+ *it += previousIndex;
+ }
+ }
+