NSBackgroundColorAttributeName for multiline attributed strings labels
问题 I'm trying to display a map with information overlayed. To improve legibility on the map, I tried several ways (text shadows, outline text, darkening the map), but nothing really worked well – hence I tried to use a semitransparent box underneath the text. I'm using the NSBackgroundColorAttributeName , which – as you can see in the screenshot – works fine for single line labels. In the multiline case though, the box seems to fill a whole line, even if there are no characters above. Is this a