kovidgoyal / kitty

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

Nerd Font icons getting small if followed by a non-breaking space #8049

Closed Nidrax closed 1 day ago

Nidrax commented 1 day ago

Describe the bug NF Icons display at half the size when followed by a letter and full size when followed by a space (not sure if having ligatures turnd off changes that). I assume this is actually by design and expected behaviour,

...but it looks like the icon is displayed half-sized also when followed by a non-breaking space (\u00a0), which in this case looks like a not-forseen scenario bug rather than expected behaviour.

To Reproduce Steps to reproduce the behavior:

  1. Paste a Nerd Font icon followed by a normal space into the terminal: echo " hello"
  2. Paste a Nerd Font icon followed by non-breaking space into the terminal: echo "⠀hello"
  3. Observe the difference

Screenshots image

Environment details

kitty 0.36.4 created by Kovid Goyal
Linux nidrax-endeavouros 6.11.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 10 Oct 2024 20:11:06 +0000 x86_64
EndeavourOS Linux 6.11.3-arch1-1 (/dev/tty)

DISTRIB_ID="EndeavourOS"
DISTRIB_RELEASE="rolling"
DISTRIB_DESCRIPTION="EndeavourOS Linux"
DISTRIB_CODENAME="rolling"
Running under: X11
OpenGL: '3.1.0 NVIDIA 560.35.03' Detected version: 3.1
Frozen: False
Fonts:
  medium: JetBrainsMonoNF-Regular: /usr/share/fonts/TTF/JetBrainsMonoNerdFont-Regular.ttf:0
          Features: ()
    bold: JetBrainsMonoNF-SemiBold: /usr/share/fonts/TTF/JetBrainsMonoNerdFont-SemiBold.ttf:0
          Features: ()
  italic: JetBrainsMonoNF-Italic: /usr/share/fonts/TTF/JetBrainsMonoNerdFont-Italic.ttf:0
          Features: ()
      bi: JetBrainsMonoNF-SemiBoldItalic: /usr/share/fonts/TTF/JetBrainsMonoNerdFont-SemiBoldItalic.ttf:0
          Features: ()
Paths:
  kitty: /usr/bin/kitty
  base dir: /usr/lib/kitty
  extensions dir: /usr/lib/kitty/kitty
  system shell: /usr/bin/zsh
Loaded config files:
  /home/nidrax/.config/kitty/kitty.conf

Config options different from defaults:
background_blur         1
background_opacity      0.9
cursor_text_color       None
font_family             family="JetBrainsMono Nerd Font"
font_size               13.0
hide_window_decorations 1
window_border_width     (0, 'pt')
Colors:
    active_border_color     #f8f8f2   
    active_tab_background   #f8f8f2   
    active_tab_foreground   #282a36   
    background              #282a36   
    color0                  #21222c   
    color1                  #ff5555   
    color10                 #69ff94   
    color11                 #ffffa5   
    color12                 #d6acff   
    color13                 #ff92df   
    color14                 #a4ffff   
    color2                  #50fa7b   
    color3                  #f1fa8c   
    color4                  #bd93f9   
    color5                  #ff79c6   
    color6                  #8be9fd   
    color7                  #f8f8f2   
    color8                  #6272a4   
    color9                  #ff6e6e   
    cursor                  #f8f8f2   
    foreground              #f8f8f2   
    inactive_border_color   #6272a4   
    inactive_tab_background #6272a4   
    inactive_tab_foreground #282a36   
    mark1_background        #ff5555   
    mark1_foreground        #282a36   
    selection_background    #44475a   
    selection_foreground    #ffffff   
    url_color               #8be9fd   

Important environment variables seen by the kitty process:
    PATH                                /usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
    LANG                                pl_PL.UTF-8
    EDITOR                              nano
    SHELL                               /usr/bin/zsh
    DISPLAY                             :0
    USER                                nidrax
    XDG_SESSION_PATH                    /org/freedesktop/DisplayManager/Session0
    LC_ADDRESS                          pl_PL.UTF-8
    LC_NAME                             pl_PL.UTF-8
    LC_MONETARY                         pl_PL.UTF-8
    XDG_SEAT                            seat0
    XDG_SESSION_DESKTOP                 i3
    XDG_SESSION_TYPE                    x11
    XDG_GREETER_DATA_DIR                /var/lib/lightdm-data/nidrax
    LC_PAPER                            pl_PL.UTF-8
    XDG_CURRENT_DESKTOP                 i3
    XDG_SEAT_PATH                       /org/freedesktop/DisplayManager/Seat0
    XDG_SESSION_CLASS                   user
    LC_IDENTIFICATION                   pl_PL.UTF-8
    LC_TELEPHONE                        pl_PL.UTF-8
    LC_MEASUREMENT                      pl_PL.UTF-8
    XDG_VTNR                            7
    XDG_SESSION_ID                      2
    XDG_RUNTIME_DIR                     /run/user/1000
    LC_TIME                             pl_PL.UTF-8
    LC_NUMERIC                          pl_PL.UTF-8
kovidgoyal commented 1 day ago

No, that's by design. See https://sw.kovidgoyal.net/kitty/faq/#some-special-symbols-are-rendered-small-truncated-in-kitty