public Box2 GetCharacterBounds(int index) { validate(); var inverseScaling = 1 / scaling; var layoutGlyph = textLayout.GetGlyph(index); var glyph = layoutGlyph.Glyph; var position = layoutGlyph.Position * inverseScaling; return(new Box2(position.X, position.Y, position.X + glyph.Width * inverseScaling, position.Y + glyph.Height * inverseScaling)); }