kovidgoyal / kitty

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

The letter "f" looks weird in the title of the active tab when using the UbuntuMono Nerd Font #7156

Closed msr8 closed 6 months ago

msr8 commented 6 months ago

Describe the bug The letter "f" looks weird in the title of the active tab (in the tab bar)

To Reproduce Steps to reproduce the behavior:

  1. Download the UbuntuMono Nerd Font (https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/UbuntuMono.zip)
  2. In kitty.conf, set font_family to UbuntuMono Nerd Font
  3. Rename a tab so that it has the letter "f" in the title
  4. See error

Screenshots

As you can see here, when I am on the second tab, the titles of both the first tab and second tab looks normal image

However when I switch to the first tab, the "f" in config looks really weird image

Same with the third tab image

This bug also occurs when I rename the tab to suppose "testf" image

Environment details

kitty 0.31.0 created by Kovid Goyal
Linux hp14 6.7.5-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Feb 17 17:20:08 UTC 2024 x86_64
S
Kernel 6.7.5-200.fc39.x86_64 on an x86_64 (/dev/tty)

Running under: Wayland
Frozen: False
Paths:
  kitty: /usr/bin/kitty
  base dir: /usr/lib64/kitty
  extensions dir: /usr/lib64/kitty/kitty
  system shell: /bin/bash
Loaded config files:
  /home/mark/.config/kitty/kitty.conf

Config options different from defaults:
background_opacity                 0.15
close_on_child_death               True
confirm_os_window_close            0
cursor_shape                       2
font_family                        UbuntuMono Nerd Font
font_size                          14.0
hide_window_decorations            1
initial_window_height              (810, 'px')
initial_window_width               (1440, 'px')
macos_quit_when_last_window_closed True
modify_font:
    cell_height 130%
remember_window_size               False
shell_integration                  frozenset({'disabled'})
tab_bar_edge                       1
tab_bar_style                      powerline
touch_scroll_multiplier            10.0
window_padding_width               FloatEdges(left=6.0, top=6.0, right=6.0, bottom=6.0)
Added shortcuts:
    alt+- →  close_tab
    alt+1 →  goto_tab 1
    alt+2 →  goto_tab 2
    alt+3 →  goto_tab 3
    alt+4 →  goto_tab 4
    alt+5 →  goto_tab 5
    alt+6 →  goto_tab 6
    alt+7 →  goto_tab 7
    alt+8 →  goto_tab 8
    alt+9 →  goto_tab 9
    alt+= →  new_tab
    alt+c →  copy_to_clipboard
    alt+left →  previous_tab
    alt+q →  close_tab
    alt+r →  set_tab_title
    alt+right →  next_tab
    alt+t →  new_tab
    alt+v →  paste_from_clipboard
    shift+super+- →  change_font_size all -1.0
    shift+super+= →  change_font_size all +1.0
    super+f →  toggle_fullscreen
Changed shortcuts:
    kitty_mod+- →  change_font_size all -1.0
    kitty_mod+= →  change_font_size all +1.0
Colors:
    background                         #020b0e   
    foreground                         #ffffff   

Important environment variables seen by the kitty process:
    PATH                                /home/mark/.local/bin:/home/mark/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:~/.cargo/bin:/Users/mark/.spicetify:/home/mark/.spicetify:/home/mark/.spicetify
    LANG                                en_US.UTF-8
    EDITOR                              nvim
    SHELL                               /bin/bash
    DISPLAY                             :0
    WAYLAND_DISPLAY                     wayland-0
    USER                                mark
    XDG_DATA_DIRS                       /home/mark/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/
    XDG_RUNTIME_DIR                     /run/user/1000
    XDG_CURRENT_DESKTOP                 GNOME
    XDG_MENU_PREFIX                     gnome-
    XDG_SESSION_CLASS                   user
    XDG_SESSION_DESKTOP                 gnome
    XDG_SESSION_TYPE                    wayland

Additional context The bug does not occur when using a different font. Here is a minimal kitty.conf that causes this bug:

# Commenting this line fixes the issue
font_family UbuntuMono Nerd Font

# Not relevant
map alt+=              new_tab
map alt+right          next_tab
map alt+left           previous_tab

image

Also here as you can see, the letter "y" looks weird too, even though it didnt with my original kitty.conf (as you can see in the screenshots in the "screenshots" section)

kovidgoyal commented 6 months ago

This is because f in the bold italic face fo this font is wider than the rest of the characters in the font. Report it to the font designers as bug. Or increase the cell width in kitty or try a non patched version of th font.