kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
24.14k stars 972 forks source link

Descenders start getting chopped off after zooming in to some zoom level #3381

Closed poetaman closed 3 years ago

poetaman commented 3 years ago

Descenders start getting chopped off after zooming in to some zoom level. The same problem doesn't happen in other terminals on macOS like iTerm2 or Alacritty.

To Reproduce Steps to reproduce the behavior:

  1. Open Vim in kitty
  2. Take cursor to a line that has characters with descenders like g
  3. Press and hold <Command-+> or <Command-=> on macOS to increase font size, at some large size the chopping will happen.

Screenshots

Screen Shot 2021-03-11 at 2 59 44 PM

Environment details macOS BigSur 11.2.3

Problem also occurs with kitty --config NONE

kovidgoyal commented 3 years ago

Doesnt happen for me, what font is this?

kitty --debug-font-fallback

and you can always adjust line height in kitty.conf with adjust_line_height

poetaman commented 3 years ago

@kovidgoyal I am using Apple Silicon macOS (which is ARM64), not sure if that has anything to do with this.

It doesn't matter what font I select, so font is not the problem. Another sign its not a font problem is this: chopping doesn't happen at usual sizes, only at quite big size.

At each <Cmd-+> it doesn't print much information other than for a powerline glyph that gets picked by kitty. Here's the the line that gets printed at the zoom level where chopping starts (though not sure how useful it is):

U+2630 bold Face(family=Arial Unicode MS, full_name=Arial Unicode MS, postscript_name=ArialUnicodeMS, path=/System/Library/Fonts/Supplemental/Arial Unicode.ttf, units_per_em=2048, ascent=102.6, descent=26.0, leading=0.0, point_sz=0.0, scaled_point_sz=96.0, underline_position=-9.6 underline_thickness=4.8) (new face)

Here's a gif that shows the problem:

kitty_chop

kovidgoyal commented 3 years ago

I want the first four lines of output which will tell me what font is being used. And yeah CPU architecture has nothing to do with this

poetaman commented 3 years ago

@kovidgoyal I clearly mentioned that this happens with all fonts, why do ask for font information? Anyway, I have it below for you. I have added --config NONE so you don't need to worry about getting my exact same font files, the problem happens with this too. IMHO it could be CPU architecture dependent if some library used under the hood has a bug that gets exposed in ARM64, and not x86. Also, closing an ongoing issue without explanation, is not the most fruitful thing to do. I hope you aren't doing this at mass level, because that would just create speculation among users that there are more bugs than what appear to be in pool of open issues in github.

>> /Applications/kitty.app/Contents/MacOS/kitty --debug-font-fallback --config NONE 
[071 18:34:29.946815] [glfw error 65544]: Cocoa: Failed to find service port for display, cannot get its name, using Unknown
[071 18:34:31.438969] Preloaded font faces:
[071 18:34:31.438991] normal face: /System/Library/Fonts/Menlo.ttc
[071 18:34:31.438996] bold face: /System/Library/Fonts/Menlo.ttc
[071 18:34:31.439000] italic face: /System/Library/Fonts/Menlo.ttc
[071 18:34:31.439004] bi face: /System/Library/Fonts/Menlo.ttc
[071 18:34:47.907827] [PARSE ERROR] Ignoring xterm specific key modifier resource options (CSI > m)
[071 18:34:47.943297] [PARSE ERROR] Unrecognized DCS code: 0x7a
[071 18:34:47.943306] [PARSE ERROR] Unknown CSI code: 'm' with start_modifier: '' and end_modifier: '%' and parameters: '0'
kovidgoyal commented 3 years ago

On Fri, Mar 12, 2021 at 06:41:24PM -0800, reportaman wrote:

@kovidgoyal I clearly mentioned that this happens with all fonts, why do ask for font information? Anyway, I have it below for you. I have added --config NONE so you don't need to worry about getting my exact same font files, the problem happens with this too. IMHO it could be CPU architecture dependent if some library used under the hood has a bug that gets exposed in ARM64, and not x86.

I highly doubt you have tested every font in existence. And is there some reason you dont want to tell me what font it is actually happening with? Is making already busy people go multiple rounds to get basic information something you enjoy doing?

In any case I cannot reproduce running from master at any font size using Menlo. If it is still happening for you in master, then undoubtedly it is some mysterious bug caused by Apple Silicon, so I suggest you just set adjust_line_height as a workaround.

poetaman commented 3 years ago

@kovidgoyal Am not sure what makes you overthink like this. The golden rule is to not think what's in other peoples minds and hearts, or else you will never be at peace. Does one really need to test all fonts on the system, the fact that for the same fonts the same problem does not occur on iTerm2 & Alacritty.

The information you are asking for was also visible in the gif I had already posted. It shows that fonts I use in Kitty.

kovidgoyal commented 3 years ago

On Fri, Mar 12, 2021 at 08:35:27PM -0800, reportaman wrote:

@kovidgoyal Am not sure what makes you overthink like this. The golden rule is to not think what's in other peoples minds and hearts, or else you will never be at peace. Does one really need to test all fonts on the system, the fact that for the same fonts the same problem does not occur on iTerm2 & Alacritty.

Now that you have informed me of the golden rule, go rest in peace.