monaspace icon indicating copy to clipboard operation
monaspace copied to clipboard

Neon 'calt' ligature set does not work in VS Code

Open CallumWatkins opened this issue 2 years ago • 9 comments

Trying Monaspace Neon in VS Code, there is no difference with and without calt. For example the // ligature does not work. However, with dlig this ligature does work.

CallumWatkins avatar Nov 10 '23 20:11 CallumWatkins

I can't reproduce this.

ponte-vecchio avatar Nov 13 '23 08:11 ponte-vecchio

I can't reproduce this. @ponte-vecchio

To clarify, when your configuration is "editor.fontLigatures": "'calt'", you are seeing the // ligature working correctly?

CallumWatkins avatar Nov 13 '23 12:11 CallumWatkins

It doesn't seem to work for me either.

gmosx avatar Nov 17 '23 20:11 gmosx

This appears to be a VSCode bug and duplicate of #118.

Workarounds

Disable contextual alternatives with other ligatures

'calt' off

Enable discretionary ligatures

'dlig'

nickserv avatar Nov 18 '23 12:11 nickserv

This appears to be a VSCode bug and duplicate of #56.

@nickmccurdy The problem in this issue is not that it cannot be turned off. It's that it does not work at all. It does appear to enable texture healing, but not the ligatures. It might be caused by the same underlying issue in VS Code, but that's not clear.

CallumWatkins avatar Nov 19 '23 13:11 CallumWatkins

Monaspace's usage of contextual alternatives for texture healing is unique, so I don't think using them should implicitly enable all ligature features. However, I believe some of the discretionary ligatures should be in other features (especially standard or contextual ligatures), which may enable them by default when enabling ligatures. This appears to be how FiraCode works.

nickserv avatar Nov 22 '23 05:11 nickserv

OK, so my current (🙃) understanding is that:

  1. calt enables texture healing and some of the texture-related coding ligatures, like repeated symbols (&&).
  2. dlig enables ALL ligatures (i.e. all stylistic sets)
  3. liga is not used at all
  4. stylistic sets (ss01 etc) can be used if dlig is off, when you want to use just a particular subset of ligatures.

Krzysztof-Cieslak avatar Nov 22 '23 16:11 Krzysztof-Cieslak

To add to the comment by @Krzysztof-Cieslak, I think there is one more piece to the puzzle that took me lot of trial and error to figure out:

  • For Monaspace ____ Var, the behavior above seems accurate:

    1. calt enables texture healing and some of the texture-related coding ligatures, like repeated symbols (&&).
    2. dlig enables ALL ligatures (i.e. all stylistic sets)
    3. liga is not used at all
    4. stylistic sets (ss01 etc) can be used if dlig is off, when you want to use just a particular subset of ligatures. It doesn't seem like something like 'dlig' on, 'ss01' off works, dlig always seems to take priority.
  • For Monaspace ____ (as best I can tell):

    1. calt appears to enable texture healing, but has no effect on ligatures like &&, //, := etc.
    2. dlig enables ALL ligatures (all stylistic sets as well as &&, :=)
    3. liga is not used at all
    4. stylistic sets (ss01 etc) can be used if dlig is off, when you want to use just a particular subset of ligatures. It doesn't seem like something like 'dlig' on, 'ss01' off works, dlig always seems to take priority.
    5. There is no way that I can see to enable &&, // ligatures without enabling all stylistic sets as well

Unfortunately, I would like the behavior described in item (v), but I would prefer not to use the Var family since VSCode seems to sometimes have odd behavior with the variable family when using custom CSS for the editor (glyphs are way too wide, but maybe this is something that can be adjusted).

I guess I'll just keep trying different configurations but for now hopefully this helps someone else who's trying to figure out what the heck is going on. If nothing else, I'd hope this issue can be used to track making the ligature configuration more consistent between the VF and non-VF families (ideally IMO, the non-variable should be updated to match the variable families).

ian-h-chamberlain avatar Dec 05 '23 21:12 ian-h-chamberlain

Tested using wezterm on windows and linux, both have the same behavior as @ian-h-chamberlain and @Krzysztof-Cieslak describe.

coredump avatar Jan 18 '24 17:01 coredump

Version 1.1 changes the distribution of these features, hopefully to now function as expected. calt turns on only the texture healing features, dlig is no longer used, liga turns on basic ligatures l(//, ..., etc.), and stylistic sets (ss01, ss02, etc.) each enable a set of ligatures that can be enabled based on your preference.

heathercran avatar May 21 '24 23:05 heathercran