2

I have my whitespace newline mark set to the "↴" character,

(setq whitespace-display-mappings '(
                                    (newline-mark 10 [8628 10])
                                    ))

Now, the spacing is fine when I use DejaVu monospace font, but with all the other fonts I've tried, I get this kind of behavior: weird spacing

I know it's just because I'm using a weird whitespace character but I like it and I'd like to keep it. Is it just because of the font limitation, or are there other ways around this?

Thanks! :)

1
  • You will need to adjust the :height of the face whitespace-newline to essentially shrink the character until its size is less than or equal to the normal line height of the 'default face. This is a useful question, so perhaps try and think of a way to rewrite it to inquire about reducing the size of unicode characters that are displayed via the buffer-display-table -- otherwise, it may be considered a duplicate or something. – lawlist Jul 2 '15 at 15:07
1

When newline character(s) is/are anything other than \n, the function whitespace-display-char-on creates a glyph code for the newline character(s) using the face named whitespace-newline, and that glyph code is then set as part of the buffer-display-table in lieu of \n or in addition to \n.

A workaround to the problem described by the original poster is to set the :height of the face whitespace-newline so that the chosen unicode character(s) is/are shrunken to a size that is less than or equal to the 'default face :height. This is a workaround, so the original poster will need to experiment to find the right number for the :height that suits his/her needs. The disadvantage with this workaround is that the chosen unicode character(s) may be too small and not visually appealing.

The other solution, of course, is to select a unicode character that is not larger than life.

Not the answer you're looking for? Browse other questions tagged or ask your own question.