Subject: bug#21835: 25.0.50; cursor height wrong when line-spacing is used

From: Nick Helm <[email-masked]>
Date: Mon, 21 Mar 2016 17:03:42 +1300

I also have set line-spacing in my init.el. I like how the size of the cursor now
reflects the size of the glyph under point - it avoids many of the problems of
badly designed typefaces. However, I also find the changing EOL cursor-height
size between line-body and line-end quite jarring while writing and editing.

Could the EOL cursor-height be set to the height of the tallest glyph in the line?
In Emacs 24, my understanding is that cursor-height = line-height, where
line-height was determined by adding the height of the tallest glyph in the line
to the top and bottom vertical spacing. This is the same, just without the
spacing.

Alternatively, how about setting the EOL cursor-height to the same height as the
last *displayable* glyph in the line, but with a lower size boundary? If there are
no displayable glyphs in the line or the line is empty, could the height of the
closest previous displayable glyph be used, even if it's on an earlier line? If
the buffer is empty or contains no displayable glyphs, use (default line-height -
line-spacing).

If none of that's possible or causes more grief than it's worth, how about also
letting the user arbitrarily set the cursor height? There'd need to be some
boundaries, perhaps a percentage of line-height, but this might also work well for
some people and fonts.