As you can see, I was using NSLayoutManager's
boundingRectForGlyphRange and then opted for
NSTextView's firstRectForCharacterRange method to
achieve this. However, both have exactly the same,
very weird, problem:
If the charIndex being passed in is a small "i",
everything works fine - it gets the bounding box for
that "i" character. But then, if you type in a small
"f" directly before the "i", so that you have an "fi"
combination, and then you pass in the charIndex for
the "i" that follows the "fi", the rect returned from
my method is for *both* letters - if I want to draw a
circle around the letter "i", for instance, it gets
drawn around both the "f" and the "i". What on earth
is going on here? I have as yet come across no other
letter combination that does this to me.