Closed kgizdov closed 3 years ago
The fun thing with these infinite ligatures is that in the font's construction , the final #
of ###
is the same glyph as the final #
in
On the font side, here's the substitution for, say #####
:
#
- numbersign_start.seq
#
- numbersign_middle.seq
#
- numbersign_middle.seq
#
- numbersign_middle.seq
#
- numbersign_end.seq
And as the string gets longer, the number of # - numbersign_middle.seq
only gets longer. There's no other difference.
If ###
renders fine and a really long string of ####################
does not, then the bug is on kitty's end. In both situations the ligated form has the same advanced width as the constituent #
.
Cascadia family version
2105.24
Cascadia family variant(s)
Cascadia Code (the version with ligatures)
Font file format(s)
.ttf (variable), .ttf (static), .otf (static)
Platform
Linux (ArchLinux x86_64)
Other Software
kitty
terminalPython 3.9.6
What happened?
Relevant tracking issue - https://github.com/kovidgoyal/kitty/issues/3504
The length of the ligature is longer than the length of the string made up of the individual characters resulting in glyph cell overflow and truncation. Tested with multiple software and discussed in relevant issue.
To reproduce:![kitty-python-test](https://user-images.githubusercontent.com/3164953/124452028-acda1500-dd8e-11eb-8333-6be0e93b5fe6.png)
kitty --config NONE -o 'font_family Cascadia Code' python -c "print(('#' * 60), end=']'); input()"
results in:As can be seen the last
#
is truncated to fit in the glyph cell. This does not happen in other software as most are happy to overflow.