Skip to content

Fix issue with font line spacing support and add option for it #1153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 26, 2020

Conversation

ychin
Copy link
Member

@ychin ychin commented Dec 26, 2020

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.

Recent change to stateful renderer (macvim-dev#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 macvim-dev#928 / macvim-dev#949 which was fixed in macvim-dev#957. Also see macvim-dev#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 macvim-dev#1152.
@ychin ychin added this to the snapshot-170 milestone Dec 26, 2020
@ychin ychin merged commit afeb743 into macvim-dev:master Dec 26, 2020
@ychin ychin deleted the fix-line-spacing-provide-options branch December 26, 2020 07:47
@9mm
Copy link

9mm commented Dec 27, 2020

🙏🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What happened to fonts?
2 participants