monaspace icon indicating copy to clipboard operation
monaspace copied to clipboard

Unable to Enable Font Ligatures with Monaspace Font in IntelliJ IDEA 2023.2.2

Open zyfgisrs opened this issue 1 year ago • 15 comments

Hello,

I am encountering an issue with enabling font ligatures in IntelliJ IDEA 2023.2.2 using the Monaspace font. Despite following the standard procedure for enabling ligatures in the IDE, they do not appear to be working.

Issue Description

Environment: IntelliJ IDEA 2023.2.2 Font: Monaspace Issue: The ligatures feature of the Monaspace font is not functioning as expected.

Steps to Reproduce

Open IntelliJ IDEA 2023.2.2 and navigate to File > Settings > Editor > Font. Select the Monaspace font. Enable the option "Enable font ligatures". Apply the changes and observe that ligatures are not displayed in the editor.

Expected Behavior

The expected behavior is that upon enabling the "Enable font ligatures" option for the Monaspace font, ligatures should be visible in the code editor, as they are in other IDEs like Visual Studio Code.

Actual Behavior

Despite enabling the ligatures option, they are not being displayed in the IntelliJ IDEA editor when using the Monaspace font.

I would appreciate any assistance in resolving this issue or understanding if there are any additional steps or configurations required to enable font ligatures with Monaspace in IntelliJ IDEA 2023.2.2.

zyfgisrs avatar Nov 11 '23 05:11 zyfgisrs

I thought it was interesting to share what happens when ligatures are not displayed, here are some pictures:

Without Ligatures
without
With Ligatures
with

Wherever there would be a ligature, the letters disappear. For instances, maximize becomes mxze.

Byron avatar Nov 11 '23 07:11 Byron

Same on IntelliJ IDEA 2023.2.5

ishenyi avatar Nov 11 '23 14:11 ishenyi

Same problem, IDEA 2023.2.4 and 2023.2.5. System is archlinux with fontconfig 2.14.2 if it may matter.

fanf avatar Nov 12 '23 12:11 fanf

The thing is that IntelliJ-based IDE does not support stylistic sets: https://youtrack.jetbrains.com/issue/IDEA-221886/Support-stylistic-sets-for-fonts .

All ligatures seem tied to a specific stylistic set in those fonts, which is not the case for many coding fonts. I guess they had to do it this way.

dantereve avatar Nov 12 '23 22:11 dantereve

I'm on 2023.2.1 on macOS 14.1 and it seems to work great for me:

Screenshot 2023-11-14 at 15 41 11 Screenshot 2023-11-14 at 15 41 21

xonev avatar Nov 14 '23 23:11 xonev

I'm on 2023.2.1 on macOS 14.1 and it seems to work great for me:

Screenshot 2023-11-14 at 15 41 11 Screenshot 2023-11-14 at 15 41 21

Pls check the last two lines of your second screenshot, apparently it's not working.

image

image

image

vonhyou avatar Nov 15 '23 03:11 vonhyou

Excuse me, you're right that the actual ligatures aren't working but the texture healing does work correctly when I enable ligatures. That was broken as well for the OP.

xonev avatar Nov 15 '23 05:11 xonev

Hello, i am experiencing the same behavior with WebStorm 2023.2.5. Any news/updates?

savva312 avatar Nov 17 '23 08:11 savva312

Yeah this feels frustrating that I have to individually opt-in to enable ligatures, which I can't do in Rider. I just want all ligatures on always if I set "enableFontLigatures" in any editor. Is there not a way to do this with how the fonts are created?

josh-degraw avatar Nov 17 '23 20:11 josh-degraw

Same situation here with Webstorm 2023.2.5. Any updates?

EvanNotFound avatar Dec 19 '23 06:12 EvanNotFound

Both Intellij (on MacOS Sonoma) and Rider 2023.3.1 (on Windows 11) do not show the Monaspace ligatures. But ligatures work on both with the JetBrains Mono font.

maragnus avatar Dec 20 '23 04:12 maragnus

Guys, please read the thread carefully. Stylistic sets (i.e. custom ligatures) are NOT supported in IntelliJ products yet.

One can use OpenType Feature Freezer to generate fonts for IntelliJ at his own risk or wait for OpenType features freezing ticket to be implemented.

ai212983 avatar Dec 29 '23 17:12 ai212983

I for one am well aware that the IDEA issue is on their side. I'm specifically asking if in this font library there can be a subset of fonts generated with all ligatures enabled that doesn't require manually configuring OTT features for editors that don't yet support it. I believe there are other fonts that do this for this purpose until these OTT features have wider support.

josh-degraw avatar Dec 29 '23 17:12 josh-degraw

@josh-degraw, I believe the ticket I mentioned should cover that.

As a side note, Monaspace uses font variables (width, slant, fine-grained weight) which most IDEs can't configure. For instance, after using the narrower PragmataPro, Monaspace in IDEA appears overly wide.

Using the fontTools library for batch converting variable Monaspace fonts could work as a solution until @githubnext adds the feature/variable freezing.

ai212983 avatar Dec 29 '23 17:12 ai212983

¿Qué, a ustedes les aparece para elegir la fuente monaspace? pensé que esa tipografía no era compatible con intellij idea. tengo la versión "IntelliJ IDEA 2024.1.4 (Ultimate Edition)" y para hoy 22 de julio de 2024 no aparece ninguna fuente monaspace en las opciones tipográficas del IDE.

image image

VsedanoVargas avatar Jul 22 '24 20:07 VsedanoVargas