Skip to content

kitty terminal support #1

Description

@anakojm

kitty terminal currently does not handle ucsur sp as double width, except if you add a space after every individual character.
however, it is fairly easy to modify kitty’s source code to make the whole of sp ucsur double width:

diff --git a/gen/wcwidth.py b/gen/wcwidth.py
index 0087403cb..bbb562d55 100755
--- a/gen/wcwidth.py
+++ b/gen/wcwidth.py
@@ -267,6 +267,8 @@ def parse_eaw() -> None:
     doublewidth |= set(range(0xF900, 0xFAFF + 1)) - seen
     doublewidth |= set(range(0x20000, 0x2FFFD + 1)) - seen
     doublewidth |= set(range(0x30000, 0x3FFFD + 1)) - seen
+doublewidth |= set(range(0xF1900, 0xF19FF + 1)) - set(range(0xF1990, 0xF199B + 1))
+doublewidth |= {0xF1993}


 def parse_grapheme_segmentation() -> None:

(unlike this repo’s wcwidth, start and end of cartouche are not set as doublewidth, as it looks weird otherwise)
just run python gen/wcwidth.py, and then compile normally: ./dev.sh build

output of `cat etc/󱥠󱥔.txt` in kitty

here is what it looks like with start/end of cartouche as doublewidth:

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions