Nerd fonts not rendering ligatures in Emacs

I have emacs-pgtk installed using a really vanilla emacs home-manager setup. But it does not support ligatures for nerd fonts. I am using Maple Mono nerd font using stylix. But none of the ligatures appear in emacs.

Is there any way I can get it to work? A lot of old reddit posts said that if emacs is compiled with harfbuzz support, it should work well (even without ligatures.el).

I’m not really sure about Emacs, but something you can check is which terminal emulator you are using and if it has support for ligatures.

Emacs has its own gtk client, and that’s most likely what you’re using if you use emacs-pgtk, so the terminal emulator isn’t a factor (though if you do use emacs in a terminal emulator harfbuzz support doesn’t matter for ligatures, and you do in fact need to configure your terminal instead).

Afaik to get ligatures you need to still configure the mappings, and that’s exactly what ligature.el does. It does use the harfbuzz engine that was introduced in emacs 27 to do that, though, unlike prettify-symbols-mode.

1 Like

Nope, I don’t use emacs in the terminal emulator. ligatures.el uses only a few fonts for ligature support. I think it’s Cascadia, JetBrainsMono, and only a few others. It’s on their github page. Is there any way I can enable for my specific fonts?

Should be pretty easy, see this heading: GitHub - mickeynp/ligature.el: Display typographical ligatures in Emacs

1 Like