Fix issue with font line spacing support and add option for it #1153
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Recent change to stateful renderer (#858) has inadvertantly changed how MacVim handles line spacing. Previously, MacVim intentionally ignores the line spacing of a font and creates a new dummy font that essentially has line spacing of 1, but the new code uses the font as is. This means font with non-standard line spacing (e.g. Input Mono) will look different. This is technically the correct way to handle fonts but is different from how MacVim has worked for years.
Also, see last time this regression (where MacVim didn't discard line spacing) happened in #928 / #949 which was fixed in #957. Also see #977 where the bug was filed the other way requesting for using the font's line spacing instead of discarding it.
This commit re-introduces the behavior to discard line spacing, but only provides it as an option (can be set in the preference pane), while defaulting to using the line spacing as that seems more correct.
Note that from a casual survey of other terminals and editors, this behavior is quite inconsistent. Xcode does use the font's line spacing, and was partially the motivation of switching to that as a default.
Close #1152.