kovidgoyal / kitty

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

disable_ligatures options does not work with Cartograph CF #7378

Closed sounak-kun closed 3 weeks ago

sounak-kun commented 3 weeks ago

Describe the bug disable_ligatures always or disable_ligatures cursor does not work with Cartograph CF most likely due to having the ligatures under liga instead of calt

While I can use -liga as a font_feature, it would not work with disable_ligatures cursor which I am really after.

To Reproduce Steps to reproduce the behavior:

  1. Set font_family to Cartograph CF
  2. Set disable ligatures to always
  3. Restart the terminal
  4. Type out echo '=>' and the ligatures still appear.

Screenshots image

Environment details

kitty 0.31.0 created by Kovid Goyal
Linux apollo 6.8.6-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Apr 13 15:14:23 UTC 2024 x86_64
S
Kernel 6.8.6-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: /usr/bin/zsh
Loaded config files:
  /home/sounak/.config/kitty/kitty.conf

Config options different from defaults:
active_tab_font_style      (False, False)
active_tab_title_template   {index} {title}
bold_font                  Cartograph CF Demi Bold
bold_italic_font           Cartograph CF Demi Bold Italic
cursor                     None
cursor_shape               2
cursor_stop_blinking_after 0
font_family                Cartograph CF Light
font_features:
{'CartographCF-ExtraBoldItalic': ('+ss02',),
 'CartographCF-RegularItalic': ('+ss02',)}
font_size                  12.0
hide_window_decorations    1
initial_window_height      (700, 'px')
initial_window_width       (100, 'cells')
italic_font                Cartograph CF Light Italic
mouse_hide_wait            0.0
paste_actions              frozenset({'invalid'})
remember_window_size       False
scrollback_lines           16384
selection_foreground       None
shell_integration          frozenset({'no-title'})
show_hyperlink_targets     True
tab_bar_align              center
tab_bar_edge               1
tab_bar_margin_height      TabBarMarginHeight(outer=5.0, inner=5.0)
tab_bar_min_tabs           1
tab_bar_style              custom
tab_title_template          {index} {title}
undercurl_style            thick-sparse
window_padding_width       FloatEdges(left=4.0, top=4.0, right=4.0, bottom=4.0)
Colors:
    active_border_color        #7bd886   
    active_tab_background      #454545   
    active_tab_foreground      #ffffff   
    background                 #222222   
    bell_border_color          #fd9353   
    color1                     #fc618d   
    color10                    #7bd88f   
    color11                    #fce566   
    color12                    #948ae3   
    color13                    #948ae3   
    color14                    #5ad4e6   
    color2                     #7bd88f   
    color3                     #fce566   
    color4                     #948ae3   
    color5                     #948ae3   
    color6                     #5ad4e6   
    color7                     #f7f1ff   
    color8                     #69676c   
    color9                     #fc618d   
    foreground                 #f7f1ff   
    inactive_border_color      #bab6c0   
    inactive_tab_background    #303030   
    inactive_tab_foreground    #ffffff   
    selection_background       #363537   
    tab_bar_background         #303030   
    tab_bar_margin_color       #303030   
    url_color                  #5ad4e6   

Important environment variables seen by the kitty process:
    PATH                                /home/sounak/.local/zbin:/usr/local/bin:/usr/local/sbin:/home/sounak/.cargo/bin:/usr/bin:/usr/sbin
    LANG                                en_IN.UTF-8
    VISUAL                              nvim
    EDITOR                              nvim
    SHELL                               /usr/bin/zsh
    DISPLAY                             :0
    WAYLAND_DISPLAY                     wayland-0
    USER                                sounak
    XDG_DATA_DIRS                       /home/sounak/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/
    XDG_RUNTIME_DIR                     /run/user/1000
    XDG_CONFIG_HOME                     /home/sounak/.config
    XDG_CURRENT_DESKTOP                 GNOME
    XDG_MENU_PREFIX                     gnome-
    XDG_SESSION_CLASS                   user
    XDG_SESSION_DESKTOP                 gnome
    XDG_SESSION_TYPE                    wayland
kovidgoyal commented 3 weeks ago

Read the docs of the disable_ligatures option. https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.disable_ligatures

sounak-kun commented 3 weeks ago

Read the docs of the disable_ligatures option. https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.disable_ligatures

Unless I am missing something, disable_ligatures is only designed to work with calt and not liga. liga if need be, should be disabled through font_features.

But there does not appear to be any way to get the same behavior as disable_ligatures cursor using font_features

kovidgoyal commented 3 weeks ago

On Mon, Apr 22, 2024 at 11:16:06AM -0700, Sounak Kundu wrote:

Read the docs of the disable_ligatures option. https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.disable_ligatures

Unless I am missing something, disable_ligatures is only designed to work with calt and not liga. liga if need be, should be disabled through font_features.

But there does not appear to be any way to get the same behavior as disable_ligatures cursor using font_features

There isnt. disable_ligatures is for programming fonts, which all ise calt for their ligatures. liga is generally for typographic ligatures

sounak-kun commented 3 weeks ago

There isnt. disable_ligatures is for programming fonts, which all ise calt for their ligatures. liga is generally for typographic ligatures

That's understandable. I'll contact them to see if they can move the ligatures to calt, or I guess I have to somehow do it using fontforge myself.

Thanks for your input.