+ const Length totalNumberOfCharacters = mText.Count();
+
+ // Process the color runs.
+ Vector<ColorRun> removedColorRuns;
+ UpdateCharacterRuns<ColorRun>( index,
+ numberOfCharacters,
+ totalNumberOfCharacters,
+ mColorRuns,
+ removedColorRuns );
+
+ // Process the background color runs.
+ Vector<ColorRun> removedBackgroundColorRuns;
+ UpdateCharacterRuns<ColorRun>( index,
+ numberOfCharacters,
+ totalNumberOfCharacters,
+ mBackgroundColorRuns,
+ removedBackgroundColorRuns );
+
+ // Process the font description runs.
+ Vector<FontDescriptionRun> removedFontDescriptionRuns;
+ UpdateCharacterRuns<FontDescriptionRun>( index,
+ numberOfCharacters,
+ totalNumberOfCharacters,
+ mFontDescriptionRuns,
+ removedFontDescriptionRuns );
+
+ // Free memory allocated for the font family name.
+ FreeFontFamilyNames( removedFontDescriptionRuns );