githubnext / monaspace

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

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

Closed CallumWatkins closed 1 month ago

CallumWatkins commented 8 months ago

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.

ponte-vecchio commented 7 months ago

I can't reproduce this.

CallumWatkins commented 7 months ago

I can't reproduce this. @ponte-vecchio

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

gmosx commented 7 months ago

It doesn't seem to work for me either.

nickmccurdy commented 7 months ago

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

Workarounds

Disable contextual alternatives with other ligatures

'calt' off

Enable discretionary ligatures

'dlig'
CallumWatkins commented 7 months ago

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.

nickmccurdy commented 7 months ago

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.

Krzysztof-Cieslak commented 7 months ago

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.
ian-h-chamberlain commented 7 months ago

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:

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

coredump commented 5 months ago

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

heathercran commented 1 month ago

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.