- // Retrieve the glyphs and the glyph to character conversion map.
- shaping.GetGlyphs( glyphsBuffer + glyphIndex,
- glyphToCharacterMapBuffer + glyphIndex );
+ totalNumberOfGlyphs += numberOfGlyphs;
+ numberOfNewGlyphs += numberOfGlyphs;
+
+ glyphs.Insert( glyphs.Begin() + glyphIndex, tmpGlyphs.Begin(), tmpGlyphs.End() );
+ glyphToCharacterMap.Insert( glyphToCharacterMap.Begin() + glyphIndex, tmpGlyphToCharacterMap.Begin(), tmpGlyphToCharacterMap.End() );
+ glyphIndex += numberOfGlyphs;
+
+ // Set the buffer pointers again.
+ glyphToCharacterMapBuffer = glyphToCharacterMap.Begin();