If the range passed to GetRectsForRange includes a newline character, then the framework expects to see a rectangle representing the newline so it knows where to position the cursor at the end of the line. If the range covers other non-printing characters but not the newline, then GetRectsForRange should not produce a rectangle for the line.