Kitty: Problem about Nerd Font Unicode characters (from PUA)

Created on 3 Mar 2018  路  8Comments  路  Source: kovidgoyal/kitty

I've read your FAQ, but still couldn't quite understand what was your approach about those characters. Won't you going to solve this problem?

Alacritty

Alacritty

Kitty

Kitty

Most helpful comment

I had half an hour, so I implemented the PUA + space = ligature hack. I haven't really tested it much, so YMMV.

All 8 comments

Try putting one of those PUA characters next to an M instead of a space in alacritty and see what happens. As is mentioned in the FAQ, the proper fix is to create ligatures of those characters with the space character in the font. That way they will render using two cells when followed by a space. Or not use wide symbols for PUA characters.

One thing that kitty could do, is allow the user to define the space ligatures in the config file for PUA characters, so you dont have to rely on font designers doing it. However, this a kludge.

So basically you are saying; I can't do anything about that, let its font designers solve this problem on their own? I don't think they are going to fix this to be honest.

One thing that kitty could do, is allow the user to define the space ligatures in the config file for PUA characters

Can you show me an example about that?

Try putting one of those PUA characters next to an M instead of a space in alacritty and see what happens.

I know what will happen and I don't think this is a problem. Everybody knows that symbol contains two-cells and they are not gonna put just next to some letters.

Or not use wide symbols for PUA characters.

I'm reporting this as a problem of mine. What you are saying is, don't use them; is kind of funny.

On Sun, Mar 04, 2018 at 03:01:23AM +0000, Kutsan Kaplan wrote:

So basically you are saying; I can't do anything about that, let its font designers solve this problem on their own? I don't think they are going to fix this to be honest.

Yes, you want to do something that is fundamentally broken (display a
wide character in a narrow space). Either you get the characters cut
off/resized as in kitty, or you get them bleeding onto neighboring
characters as in other terminals.

One thing that kitty could do, is allow the user to define the space ligatures in the config file for PUA characters

Can you show me an example about that?

There is nothing to show, someone would have to write the code to
special case the sequence PUA + space and render it as a two character
ligature, without the ligature being actually defined in the font.

It's not too hard to implement, it's just hacky (and not personally
useful for me), so I am not very motivated to implement it.
But patches are welcome.

No every body does not know any such thing. That is the whole meaning of a PUA character, it has no defined semantics, which means that no one can know anything about them, a priori.

And if you decide you have a problem because kitty does not brew your morning coffee, I am going to tell you to not expect kitty to brew your morning coffee.

I had half an hour, so I implemented the PUA + space = ligature hack. I haven't really tested it much, so YMMV.

Thanks for that. I tried it now, looks pretty decent but don't you think it's a little bit closely spaced? There is an extra space character between symbol and first letter of directories.

Kitty

image

Alacritty

image

Looks fine to me. How close it gets depends on how wide the underlying character is in the font, upto two cells wide. If you want more space, the solution is to use an extra space after the symbol.

Was this page helpful?
0 / 5 - 0 ratings