I have created a custom NSLayoutManager
to render a border around certain characters in a string whenever a custom NSAttributedString
attribute is found. The box is supposed to be bigger than the standard bounding box of the glyph which isn't hard to do. The problem I'm having is that if the glyph is on the edge of the text view, the sides are clipped. What I would like is for the box (or enough padding for the box) to be included in the layout calculations.
Here is an example of the box without proper padding:
Here is an example of the box with proper padding: