- const Length glyphIndex = totalNumberOfGlyphs;
- totalNumberOfGlyphs += numberOfGlyphs;
-
- if( totalNumberOfGlyphs > numberOfGlyphsReserved )
+ // 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 )