-
-
Notifications
You must be signed in to change notification settings - Fork 686
-[MMCoreTextView initWithFrame:] doesn't initialize fontDescent #883
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
Comments
Any update? |
I can take a look. Do you have a concrete repro that I can use to validate this? As in what are the symptoms form this issue? |
Just launch MacVim without any .vimrc/.gvimrc on macOS 10.15 beta you will
see this, all the text will be clipped.
…On Sat, Jul 27, 2019 at 1:24 AM Yee Cheng Chin ***@***.***> wrote:
I can take a look. Do you have a concrete repro that I can use to validate
this? As in what are the symtoms form this issue?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#883?email_source=notifications&email_token=AAAAH6P4SSL37LL6XTIPZV3QBQA5LA5CNFSM4HHRWJTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD26HBOI#issuecomment-515666105>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAAH6JHC23GOFZZGSKWEV3QBQA5LANCNFSM4HHRWJTA>
.
|
this depends on a font |
Nope, MacVim has a default GUI font when nothing is set.
…On Sun, Jul 28, 2019 at 7:03 AM Arseny Nasokin ***@***.***> wrote:
Just launch MacVim without any .vimrc/.gvimrc on macOS 10.15 beta you will
see this, all the text will be clipped.
… <#m_-318863697324569685_>
this depends on a font
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#883?email_source=notifications&email_token=AAAAH6KRBVNB6B72CESCLGDQBWRLTA5CNFSM4HHRWJTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD267J3I#issuecomment-515765485>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAAH6J4AFFT2RXDMREU7SLQBWRLTANCNFSM4HHRWJTA>
.
|
I mean the issue with clipping is font-specific. When I set to Menlo, the issue is clearly present, when I set it to Fira Code, clipping is not present. These conditions and outcomes are repeatable even you mix the order. |
This is describing the case when the guifont is not set.
…On Sun, Jul 28, 2019 at 9:02 AM Arseny Nasokin ***@***.***> wrote:
I mean the issue with clipping is font-specific. When I set to Menlo, the
issue is clearly present, when I set it to Fira Code, clipping is not
present. These conditions and outcomes are repeatable even you mix the
order.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#883?email_source=notifications&email_token=AAAAH6OLLY54YFDL7MSDWF3QBW7INA5CNFSM4HHRWJTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD27BPGA#issuecomment-515774360>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAAH6JWBQOX3ZE64M5YPTLQBW7INANCNFSM4HHRWJTA>
.
|
Most fonts will have a non-zero descender. When |
So you want to say, that |
I'm sorry, exactly what you do to trigger this? Do you have steps to reproduce this behavior? As far as I can tell, https://github.com/macvim-dev/macvim/blob/master/src/MacVim/MMCoreTextView.m#L327
Since it always assigns |
If I'm guessing correctly, this happens in 10.15 because macOS is reusing and caching |
Correct. PR updated. |
-[MMCoreTextView initWithFrame:]
initializesfont
but notfontDescent
:so it defaults to 0. In the case of the later
-setFont:
is called with the same pointer asfont
, then other initialization related to the font won't happen.There are many ways to fix this, a simple way would be just to call
[self setFont:[NSFont userFixedPitchFontOfSize:0]]
at-initWithFrame:
.The text was updated successfully, but these errors were encountered: