You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kitty renders incorrectly (at an incorrect smaller size) the ligatures of Cascadia Code's recently-released version 2102.03. Before this precise font version (until version 2009.22, included), Kitty used to render its ligatures perfectly.
Previously, the ligatures in Cascadia were "backwards looking", which is to say that in a three glyph run, such as >>>, the final > would contain the ligature with a negative left side bearing, and normal right side bearing.
However, [starting with version 2102.03] I changed it to be "forwards looking" which means that the first > contains the ligature as that allows me to be more efficient with my code and simplifies things quite a bit. But it appears that Kitty can't deal with that.
To Reproduce
Steps to reproduce the behavior:
Install Cascadia Code 2102.03 (I used the static TTF version / regular+bold. I didn't try the TTFbundle or OTF versions)
Type text with ligatures (e.g. echo 'https://google.com' && echo 'a !== b' && echo '--version' && echo 'foo && bar', which has ligatures in //, &&, !==, --)
Confirm with hb-shape that the ligatures don't consume more space than they should:
Note that it works by checking how the font wants to render the ligature for === if it does it with trailing spacer glyphs, instead of leading ones then all ligatures are assumed to be with trailing spacer glyphs rather than leading ones. So please keep your ligatures consistent.
This bug is extracted from discussion in Kitty bug #2599: Ligatures - Spacing issue with MonoLisa font (I'm not sure these are two different bugs, the other bug is closed, and Kovid confirmed my bug).
Describe the bug
Kitty renders incorrectly (at an incorrect smaller size) the ligatures of Cascadia Code's recently-released version 2102.03. Before this precise font version (until version 2009.22, included), Kitty used to render its ligatures perfectly.
Chatting in a comment of Cascadia Code issue #409, here is what the font maintainer @aaronbell has to say about changes in this release he thinks might cause this behavior:
To Reproduce
Steps to reproduce the behavior:
kitty --config NONE -o 'font_family=Cascadia Code'
echo 'https://google.com' && echo 'a !== b' && echo '--version' && echo 'foo && bar'
, which has ligatures in//
,&&
,!==
,--
)→ All the glyphs fit within the appropriate bounds:
!==
has a width of 3240, which is within the three cell width of 3600 (even including the LSB of 180).&&
has a width of 2008, which is within the two cell width of 2400 (even including the LSB of 186).//
has a width of 1898, which is within the two cell width of 2400 (even including the LSB of 294).Expected behavior
Kitty renders the ligatures at correct size.
Actual behavior & Screenshots
![screenshot_kitty_2021-02-12-12:52:55](https://user-images.githubusercontent.com/522085/107804177-95dc4d00-6d31-11eb-9488-84fd5811f999.png)
Kitty renders ligatures at an incorrect smaller font size (half, maybe?):
Environment details
OS: Ubuntu Linux 20.10, fully up-to-date
Output of kitty --debug-config:
Additional context
Problem reproduced with
kitty --config NONE -o 'font_family=Cascadia Code'
.The text was updated successfully, but these errors were encountered: