Skip to content

Rows of text seem clipped at certain font sizes on Catalina #905

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

Closed
twk opened this issue Jun 11, 2019 · 33 comments
Closed

Rows of text seem clipped at certain font sizes on Catalina #905

twk opened this issue Jun 11, 2019 · 33 comments

Comments

@twk
Copy link

twk commented Jun 11, 2019

Running 8.1.950 on Catalina, when I start MacVim, some lowercase letters are getting clipped:

image

If I adjust the font size and then adjust it back, things are rendered correctly:

image

This started as soon as I upgraded to Catalina -- Mojave was fine. My font settings are English/Menlo/Regular/11

@ychin
Copy link
Member

ychin commented Jun 11, 2019

I will need to see if I can repro this under the new Xcode. Otherwise could be tricky as I don't have a beta Catalina install with me.

@adamjacobmuller
Copy link

adamjacobmuller commented Jun 14, 2019

Happens for me after upgrading to catalina, but, only with Core Text renderer enabled.

With Core Text renderer disabled things are actually considerably worse.

image

actual:

image

@eirnym
Copy link
Contributor

eirnym commented Jun 14, 2019

I'd wait for first public beta. Before that point macOS is not really usable at all

@adamjacobmuller
Copy link

Aside from the MacVim issue my workflow is fine and I've just been running vim instead.

@eirnym
Copy link
Contributor

eirnym commented Jun 15, 2019

I'm really surprised to read it! This release will be the first one with relatively stable betas, since it wasn't a case since macOS 10.7 Beta 1

@eirnym
Copy link
Contributor

eirnym commented Jun 26, 2019

Public Beta is out…

@eirnym
Copy link
Contributor

eirnym commented Jun 26, 2019

It's interesting, I can reproduce it with

guifont=Menlo-Regular:h11, but not with guifont=Fira\ Code\ Light:h12

@jjgod
Copy link
Contributor

jjgod commented Jul 28, 2019

This is a duplicate of #883.

@jjgod
Copy link
Contributor

jjgod commented Jul 28, 2019

Oh, @eirnym, it's because the comparison sees that the new font Menlo-Regular:h11 is the same as the default font initialized by -[MMCoreTextView initWithFrame:] and skip rest of the initialization:

if (!(newFont && font != newFont))
    return;

That's why in this case fontDescent is still properly initialized.

@jjgod
Copy link
Contributor

jjgod commented Jul 28, 2019

(lldb) p font
(NSCTFont *) $0 = 0x0000000101c233e0
(lldb) p newFont
(NSCTFont *) $1 = 0x0000000101c233e0
(lldb) po font
"Menlo-Regular 11.00 pt. P [] (0x101c28300) fobj=0x101c233e0, spc=6.62"

(lldb) po newFont
"Menlo-Regular 11.00 pt. P [] (0x101a00860) fobj=0x101c233e0, spc=6.62"

@eirnym
Copy link
Contributor

eirnym commented Jul 28, 2019

I've tried it after Fira Code, to guarantee that it's a different one

@jjgod
Copy link
Contributor

jjgod commented Jul 28, 2019

That's why you are not hitting the problem with Fira Code.

@eirnym
Copy link
Contributor

eirnym commented Jul 28, 2019

and what's about Menlo?

I've set Fira Code first, then Menlo, and issue still exists. This doesn't neglect your issue on fontDescent, though. Probably, in macOS Catalina this parameter becomes more valuable to set if it's not.

@jjgod
Copy link
Contributor

jjgod commented Jul 28, 2019

How exactly did you do that? Did you execute multiple set guifont command?

@ychin ychin added this to the snapshot-158 milestone Jul 29, 2019
@ychin
Copy link
Member

ychin commented Jul 29, 2019

I think this should now be fixed and will be released in the next update. If someone wants to confirm (I haven't installed the beta macOS yet) that would be great.

@eirnym
Copy link
Contributor

eirnym commented Jul 30, 2019

I'll test it today

@adamjacobmuller
Copy link

i'm happy to test but i don't particularly want to build this myself and it seems like the last release was 157, any chance of 158 being released to test?

@tobireif
Copy link

tobireif commented Oct 8, 2019

I just installed MacOS Catalina (version "10.15 (19A583)"). Now I get this issue:
screenshot
The test-text: Qq Gg Yy
MacVim version "Custom Version 8.1.1722 (157)".
This is a severe issue. I hope it can get fixed soon.
:set guifont? says Menlo.

@securitygeneration
Copy link

I'm also surprised this wasn't fixed/released prior to Catalina's release.

@eirnym
Copy link
Contributor

eirnym commented Oct 9, 2019

@securitygeneration This is an open source project. You could do a contribution of your time and knowledge.

@securitygeneration
Copy link

securitygeneration commented Oct 9, 2019

@eirnym I was following this and saw that it seemed to be tentatively resolved (#905 (comment)), and so it didn't seem to need any additional attention (although yes, I could've tried to test it). ¯\_(ツ)_/¯

@ychin
Copy link
Member

ychin commented Oct 10, 2019

Next update will be out this weekend.

@hoke-t
Copy link

hoke-t commented Oct 14, 2019

Any updates on this?

@isaki
Copy link

isaki commented Oct 14, 2019

As per @eirnym, I am posting this here and closing my issue.

I can confirm this is still an issue after the weekend.

I am running the latest release:
image

And can confirm fonts still look strange:
image

And that the changing the font size back and forth fixes things:
image

My macOS version:

% sw_vers 
ProductName:	Mac OS X
ProductVersion:	10.15
BuildVersion:	19A583

@eirnym
Copy link
Contributor

eirnym commented Oct 15, 2019

@isaki Thank you for an addition, Please, write which distribution of MacVim do you use (e.g. GitHub, Homebrew, MacPorts, etc) and which font are you using (:set guifont?)

@tobireif
Copy link

changing the font size back and forth fixes things

Here it fixes it temporarily for that one buffer/window, but not permanently.

(I'm using the distribution from https://github.com/macvim-dev/macvim/releases plus auto-updates.)

:set guifont? says guifont=Menlo:h16

@hoke-t
Copy link

hoke-t commented Oct 15, 2019

I have the exact issue as well. I always have to increase and then decrease the font size upon opening a file to fix the clipping.

Using macOS 10.15 build version 19A583, Homebrew distribution of MacVim, and set guifont? gives guifont=Menlo-Regular:h11.

@isaki
Copy link

isaki commented Oct 15, 2019

@eirnym I am using the GitHub distribution of MacVim.

I apparently have no font set once so ever:
image

Also, commands are also being chopped off:
image

Finally, this is the font setup that seems to be in use when I run set guifont=*:
image

I hope this information helps!

@eirnym
Copy link
Contributor

eirnym commented Oct 15, 2019

Thank you, this is fixed in HEAD. So I hope @ychin will find the time to prepare a release.

@jimsiff
Copy link

jimsiff commented Oct 17, 2019

Thank you @eirnym and @ychin. It's fixed for me after building 8.1.2102 on Catalina.

ychin added a commit to ychin/macvim that referenced this issue Oct 17, 2019
Vim patch 8.1.2102

Features:

- Can now use autocommand to detect an OS appearance change (dark vs
  light mode). See `:help OSAppearanceChanged`. macvim-dev#766

Fixes:

- Fix text being clipped in macOS Catalina. macvim-dev#905

Targets macOS 10.8+

Script interfaces have compatibility with these versions:

- Lua 5.3
- Perl 5.18
- Python2 2.7
- Python3 3.7
- Ruby 2.6
ychin added a commit that referenced this issue Oct 17, 2019
Vim patch 8.1.2168

Features:

- Can now use autocommand to detect an OS appearance change (dark vs
  light mode). See `:help OSAppearanceChanged`. #766

Fixes:

- Fix text being clipped in macOS Catalina. #905
- Fix "E432: Tags file not sorted" issue in macOS Catalina. #953. (Vim
  8.1.2152)

Targets macOS 10.8+

Script interfaces have compatibility with these versions:

- Lua 5.3
- Perl 5.18
- Python2 2.7
- Python3 3.7
- Ruby 2.6
@ychin
Copy link
Member

ychin commented Oct 17, 2019

This should be fixed in snapshot-159. Let me know if it isn't.

@ychin ychin closed this as completed Oct 17, 2019
@isaki
Copy link

isaki commented Oct 17, 2019

This has indeed fixed it, thank you!

@hoke-t
Copy link

hoke-t commented Oct 17, 2019

Can confirm as well. Thanks!

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

No branches or pull requests

10 participants