How is the function drawGlyphsForGlyphRange:atPoint: in the class NSLayoutManager implemented? I know it's called by NSTextView and in turn calls fillBackgroundRectArray:count:forCharacterRange:color:
But how does it determine the backgroundcolor, if any, for the specified glyphrange?