kovidgoyal / kitty

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

Weird, wide font rendering #1388

Closed kherchel closed 5 years ago

kherchel commented 5 years ago

I've been having a weird problem with font rendering for the past few weeks. Before that everything was fine, reverting to 0.13.2 doesn't fix the issue. Reverting to default kitty config also doesn't fix the issue.

I'm using Manjaro Linux with a NVIDIA 1050 Ti GPU and proprietary drivers (415.27).

Here's a comparison with Guake terminal, the font used is Fira Code 12 in both cases, but the same problem happens with every other font as well. (DejaVu Sans Mono and Source Code Pro tested):

image

Here are some debug outputs:

kitty --debug-font-fallback [047 22:27:46.409638] Preloaded font faces: [047 22:27:46.409665] normal face: /usr/share/fonts/OTF/FiraCode-Regular.otf:0 [047 22:27:46.409674] bold face: /usr/share/fonts/TTF/FiraCode-Bold.ttf:0 [047 22:27:46.409682] italic face: /usr/share/fonts/OTF/FiraCode-Regular.otf:0 [047 22:27:46.409689] bi face: /usr/share/fonts/TTF/FiraCode-Bold.ttf:0 [047 22:27:46.701832] [PARSE ERROR] Unknown OSC code: 7

kitty --debug-config kitty 0.13.3 created by Kovid Goyal Linux wielkipierogo 4.20.7-1-MANJARO #1 SMP PREEMPT Wed Feb 6 21:54:48 UTC 2019 x86_64 Running under: X11 Manjaro Linux \r (\n) (\l) DISTRIB_ID=ManjaroLinux DISTRIB_RELEASE=18.0.2 DISTRIB_CODENAME=Illyria DISTRIB_DESCRIPTION="Manjaro Linux" Loaded config files: /home/kacperski1/.config/kitty/kitty.conf Config options different from defaults: background_opacity 0.8 font_family Fira Code font_size 12.0 shell fish

kovidgoyal commented 5 years ago

There have been no changes to kitty's font rendering code in a long time, so I think this is caused by some change on your system. Look for fontcofig/freetype related changes/config files. I'm afraid i dont have any ideas off the top of my head about what could cause this. Itbasically looks like the glyph width calculation is returning incorrect values for some reason. You can try using adjust_column_width in kitty.conf to workaround, but that may cause artifacts.