kovidgoyal / kitty

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

Font fallback isn't respected for emoji (Noto Emoji, monochrome) #7986

Closed MGislv closed 2 weeks ago

MGislv commented 2 weeks ago

Describe the bug All other apps in the system use Noto Emoji as specified in the user fontconfig. Kitty always falls back to Noto Color Emoji unless it's uninstalled, in that case blocks are shown instead. While other apps needed two files removed in "/etc/fonts/conf.d/45/60-generic.conf" (these specify emoji fallback order and precedence of color over b&w), kitty seems unaffected by any user configuration change. symbol_map shows the same behaviour as uninstalling Noto Color Emoji.

Screenshots

  1. Libreoffice image
  2. dwm image
  3. Alacritty imageDWM
  4. Kitty image

Environment details

kitty 0.36.4 created by Kovid Goyal
Linux hostname 6.11.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 17 Oct 2024 20:53:41 +0000 x86_64
Arch Linux 6.11.4-arch1-1 (/dev/tty)

Running under: X11
OpenGL: '3.3 (Core Profile) Mesa 24.2.5-arch1.1' Detected version: 3.3
Frozen: False
Fonts:
  medium: JetBrainsMono-Regular: /usr/share/fonts/TTF/JetBrainsMono-Regular.ttf:0
          Features: ()
    bold: JetBrainsMono-SemiBold: /usr/share/fonts/TTF/JetBrainsMono-SemiBold.ttf:0
          Features: ()
  italic: JetBrainsMono-Italic: /usr/share/fonts/TTF/JetBrainsMono-Italic.ttf:0
          Features: ()
      bi: JetBrainsMono-SemiBoldItalic: /usr/share/fonts/TTF/JetBrainsMono-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/user/.config/kitty/kitty.conf

Config options different from defaults:
font_size               12.0
Colors:
    active_border_color     #81a1c1   
    active_tab_background   #88c0d0   
    active_tab_foreground   #3b4252   
    background              #2e3440   
    bell_border_color       #88c0d0   
    color0                  #3b4252   
    color1                  #bf616a   
    color10                 #a3be8c   
    color11                 #d08770   
    color12                 #5e81ac   
    color13                 #b48ead   
    color14                 #8fbcbb   
    color15                 #eceff4   
    color2                  #a3be8c   
    color3                  #ebcb8b   
    color4                  #81a1c1   
    color5                  #b48ead   
    color6                  #88c0d0   
    color7                  #e5e9f0   
    color8                  #4c566a   
    color9                  #bf616a   
    cursor                  #d8dee9   
    cursor_text_color       #3b4252   
    foreground              #d8dee9   
    inactive_border_color   #4c566a   
    inactive_tab_background #4c566a   
    inactive_tab_foreground #e5e9f0   
    mark1_background        #88c0d0   
    mark1_foreground        #3b4252   
    mark2_background        #bf616a   
    mark2_foreground        #3b4252   
    mark3_background        #ebcb8b   
    mark3_foreground        #3b4252   
    selection_background    #434c5e   
    selection_foreground    #d8dee9   
    tab_bar_background      #3b4252   

Important environment variables seen by the kitty process:
    PATH                                /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/user/bin
    LANG                                it_IT.UTF-8
    EDITOR                              nvim
    SHELL                               /usr/bin/zsh
    DISPLAY                             :0
    USER                                user
    XDG_SEAT                            seat0
    XDG_SESSION_TYPE                    tty
    XDG_SESSION_CLASS                   user
    XDG_VTNR                            1
    XDG_SESSION_ID                      1
    XDG_RUNTIME_DIR                     /run/user/1000

kitty.conf.txt fonts.conf.txt

kovidgoyal commented 2 weeks ago

Yes emoji fallback prefers color fonts when available. THis is not going to change.

MGislv commented 2 weeks ago

Ok, makes sense, but why doesn't it work when there are no color emojis installed? It sounds like it's looking only for color emojis instead of just ordering by priority.

kovidgoyal commented 2 weeks ago

Don't recall of the top of my head, look in the code, fontconfig.c would have it.