kovidgoyal / kitty

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

Symbols for legacy computing - cell diagonals #7233

Closed stribor14 closed 6 months ago

stribor14 commented 6 months ago

Describe the bug Following symbols are not correctly displayed:

1FBA0    🮠  BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE LEFT
1FBA1    🮡  BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT
1FBA2    🮢  BOX DRAWINGS LIGHT DIAGONAL MIDDLE LEFT TO LOWER CENTRE
1FBA3    🮣  BOX DRAWINGS LIGHT DIAGONAL MIDDLE RIGHT TO LOWER CENTRE
1FBA4    🮤  BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE LEFT TO LOWER CENTRE
1FBA5    🮥  BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT TO LOWER CENTRE
1FBA6    🮦  BOX DRAWINGS LIGHT DIAGONAL MIDDLE LEFT TO LOWER CENTRE TO MIDDLE RIGHT
1FBA7    🮧  BOX DRAWINGS LIGHT DIAGONAL MIDDLE LEFT TO UPPER CENTRE TO MIDDLE RIGHT
1FBA8    🮨  BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE LEFT AND MIDDLE RIGHT TO LOWER CENTRE
1FBA9    🮩  BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT AND MIDDLE LEFT TO LOWER CENTRE
1FBAA    🮪  BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE RIGHT TO LOWER CENTRE TO MIDDLE LEFT
1FBAB    🮫  BOX DRAWINGS LIGHT DIAGONAL UPPER CENTRE TO MIDDLE LEFT TO LOWER CENTRE TO MIDDLE RIGHT
1FBAC    🮬  BOX DRAWINGS LIGHT DIAGONAL MIDDLE LEFT TO UPPER CENTRE TO MIDDLE RIGHT TO LOWER CENTRE
1FBAD    🮭  BOX DRAWINGS LIGHT DIAGONAL MIDDLE RIGHT TO UPPER CENTRE TO MIDDLE LEFT TO LOWER CENTRE
1FBAE    🮮  BOX DRAWINGS LIGHT DIAGONAL DIAMOND

The problems is "self explanatory" from the official names of the symbols: diagonals should not connect to the bottom/top of the cell, rather to the "upper" and "lower" centers of the middle (i.e., 1/4, and 3/4 of height)

To Reproduce echo \U1fba0\U1fba1\U1fba2\U1fba3\U1fba4\U1fba5\U1fba6\U1fba7\U1fba8\U1fba9\U1fbaa\U1fbab\U1fbac\U1fbad\U1fbae\U1fbaf'

Screenshots How it looks: image How it should look: image

Environment details

kitty 0.32.2 (925043d645) created by Kovid Goyal
Linux mirko-ThinkPad-P52 5.4.0-173-generic #191-Ubuntu SMP Fri Feb 2 13:55:07 UTC 2024 x86_64
Ubuntu 20.04.6 LTS mirko-ThinkPad-P52 /dev/tty

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
Running under: X11
Frozen: True
Paths:
  kitty: /home/mirko/.local/kitty.app/bin/kitty
  base dir: /home/mirko/.local/kitty.app/lib/kitty
  extensions dir: /home/mirko/.local/kitty.app/lib/kitty-extensions
  system shell: /usr/bin/zsh
Loaded config files:
  /home/mirko/.config/kitty/kitty.conf

Config options different from defaults:
bold_font               Fira Code Bold
bold_italic_font        Fira Mono Bold Italic
confirm_os_window_close 0
font_family             Fira Code Retina
font_features:
{'FiraCode-Bold': ('+ss09',), 'FiraCode-Retina': ('+ss09', '+zero')}
font_size               12.0
italic_font             Fira Mono Regular Italic
symbol_map:
    U+e725 - U+e725 → Symbols Nerd Font
    U+f019 - U+f019 → Symbols Nerd Font
    U+f03e - U+f03e → Symbols Nerd Font
    U+f059 - U+f059 → Symbols Nerd Font
    U+f0aa - U+f0aa → Symbols Nerd Font
    U+f0ab - U+f0ab → Symbols Nerd Font
    U+f0fe - U+f0fe → Symbols Nerd Font
    U+f14b - U+f14b → Symbols Nerd Font
    U+f187 - U+f187 → Symbols Nerd Font
    U+f240 - U+f244 → Symbols Nerd Font
    U+f45a - U+f45a → Symbols Nerd Font
    U+f4e2 - U+f4e2 → Symbols Nerd Font
    U+fae7 - U+fae7 → Symbols Nerd Font
    U+1fb00 - U+1fbff → Symbola
    U+f0219 - U+f0219 → Symbols Nerd Font
    U+f075a - U+f075a → Symbols Nerd Font
    U+f07c9 - U+f07c9 → Symbols Nerd Font
    U+f0fce - U+f0fce → Symbols Nerd Font
    U+f1105 - U+f1105 → Symbols Nerd Font
    U+f1278 - U+f1278 → Symbols Nerd Font
    U+f1a1a - U+f1a1a → Symbols Nerd Font
Colors:
    background              #001e26   
    color0                  #002731   
    color1                  #d01b24   
    color10                 #50ee84   
    color11                 #b17e28   
    color12                 #178dc7   
    color13                 #e14d8e   
    color14                 #00b29e   
    color15                 #fcf4dc   
    color2                  #6bbe6c   
    color3                  #a57705   
    color4                  #2075c7   
    color5                  #c61b6e   
    color6                  #259185   
    color7                  #e9e2cb   
    color8                  #006388   
    color9                  #f4153b   
    cursor                  #f34a00   
    foreground              #9bc1c2   
    selection_background    #003747   
    selection_foreground    #001e26   

Important environment variables seen by the kitty process:
    PATH                                /home/mirko/.cargo/bin:/home/mirko/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
    LANG                                en_US.UTF-8
    SHELL                               /usr/bin/zsh
    DISPLAY                             :0
    USER                                mirko
    LC_TIME                             hr_HR.UTF-8
    XDG_SESSION_TYPE                    x11
    XDG_SEAT_PATH                       /org/freedesktop/DisplayManager/Seat0
    LC_MONETARY                         hr_HR.UTF-8
    XDG_SESSION_CLASS                   user
    XDG_SESSION_PATH                    /org/freedesktop/DisplayManager/Session23
    LC_ADDRESS                          hr_HR.UTF-8
    XDG_RUNTIME_DIR                     /run/user/1000
    XDG_MENU_PREFIX                     gnome-
    XDG_CURRENT_DESKTOP                 Budgie:GNOME
    LC_TELEPHONE                        hr_HR.UTF-8
    XDG_SESSION_DESKTOP                 budgie-desktop
    XDG_GREETER_DATA_DIR                /var/lib/lightdm-data/mirko
    LC_NAME                             hr_HR.UTF-8
    LC_MEASUREMENT                      hr_HR.UTF-8
    LC_IDENTIFICATION                   hr_HR.UTF-8
    XDG_CONFIG_DIRS                     /etc/xdg/xdg-budgie-desktop:/etc/xdg
    XDG_DATA_DIRS                       /usr/share/budgie-desktop:/home/mirko/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/var/lib/snapd/desktop
    LC_NUMERIC                          hr_HR.UTF-8
    LC_PAPER                            hr_HR.UTF-8

If bug/enhacement is accepted, I can make a PR next week

kovidgoyal commented 6 months ago

I didnt look at all of them, but at least the first four are rendered correctly as demonstrated in the attached screenshot. If you find some that are indeed rendered incorrectly feel free to send a PR relevant code is in box_drawing.py

screenshot

stribor14 commented 6 months ago

Sorry for reopening, but I think you've got me wrong. In your case, the render is still not correct. To clarify what I mean by wrong rendering, I'll make a PR

stribor14 commented 6 months ago

The proposed fix in PR now makes it: image