Issue with ligature `<<=` · Issue #796 · microsoft/cascadia-code · GitHub
Skip to content

Issue with ligature <<= #796

Open
Open

Description

Cascadia family version

2407.24

Cascadia family variant(s)

Cascadia Code (the version with ligatures)

Font file format(s)

.ttf (variable)

Platform

macOS 15.1

Other Software

kitty 0.39.1 nightly

What happened?

Screenshot

The specific combination <<= is rendered incorrectly in kitty terminal. After having a conversation with the terminal emulator's author, we confirmed that it is a bug in the font.

I personally don't know much about fonts. So I pasted their reply below for reference purpose (the original link was given above):

This is a bug in the font, demonstrated by:

hb-shape --features "+calt" "/usr/share/fonts/OTF/CascadiaCode-Regular.otf" '<<='
[less_less_equal.liga=0+1200|LIG=1+1200|equal=2+1200]
hb-shape --features "+calt" "/usr/share/fonts/OTF/CascadiaCode-Regular.otf" '==='
[equal_equal_equal.liga=0+1200|LIG=1+1200|LIG=2+1200]

From the first command output, we see that the font is return the glyphs
less_less_equal.liga and LIG and equal

in other words its is returning two ligature glyphs and one normal equal glyph, this is precisely what kitty is rendering. Contrast with the second command that shows the glyphs for === we see all three are ligature glyphs, as expected.

Activity

  1. aaronbell commented on Feb 11, 2025

    @aaronbell
    Collaborator

    So funny story. Yes, this is a bug in the font, but it is only showing up in Kitty because of the way that Kitty is rendering the ligature.

    If you look at the behavior of the ligature here in FontGoggles, you can see the ligature colored in red, behind the equals:

    Image

    For whatever reason, Kitty has decided to resize the ligature to fit 2 monowidths rather than allowing it to fit three as it should. And so you see this shrunken version of the ligature followed by the equals. You're not seeing the issue elsewhere because pretty much everyone else just allows the ligature to use the full 3 monowidths.

    I will add this bug to the list of items to fix, but I probably won't be able to get to it for a while.

  2. javalsai commented on Jul 4, 2025

    @javalsai

    but I probably won't be able to get to it for a while.

    I'd be happy to help if someone knows a decent font editor that works on linux, FontGoggles looks amazing but seems to be mac exclusive. Really want to get this fixed.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions