public List<TextRenderInfo> GetCharacterRenderInfos()
{
List<TextRenderInfo> rslt = new List<TextRenderInfo>(text.Length);
DocumentFont font = gs.font;
char[] chars = text.ToCharArray();
float totalWidth = 0;
for (int i = 0; i < chars.Length; i++)
{
float w = font.GetWidth(chars[i]) / 1000.0f;
float wordSpacing = chars[i] == 32 ? gs.wordSpacing : 0f;
TextRenderInfo subInfo = new TextRenderInfo(this, i, totalWidth);
rslt.Add(subInfo);
totalWidth += (w * gs.fontSize + gs.characterSpacing + wordSpacing) * gs.horizontalScaling;
}
return rslt;
}