githubnext / monaspace

An innovative superfamily of fonts for code
https://monaspace.githubnext.com
SIL Open Font License 1.1
13.98k stars 232 forks source link

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

Open zyfgisrs opened 10 months ago

zyfgisrs commented 10 months ago

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.

Byron commented 10 months ago

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.

ishenyi commented 10 months ago

Same on IntelliJ IDEA 2023.2.5

fanf commented 10 months ago

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

dantereve commented 10 months ago

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.

xonev commented 10 months ago

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
vonhyou commented 10 months ago

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

xonev commented 10 months ago

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.

savva312 commented 10 months ago

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

josh-degraw commented 10 months ago

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?

EvanNotFound commented 9 months ago

Same situation here with Webstorm 2023.2.5. Any updates?

maragnus commented 9 months ago

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.

ai212983 commented 9 months ago

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.

josh-degraw commented 9 months ago

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.

ai212983 commented 9 months ago

@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.

VsedanoVargas commented 2 months ago

¿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