Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

font ligatues with stylistic sets not fully working with editor.letterSpacing setting #84018

Closed
ArturoDent opened this issue Nov 6, 2019 · 3 comments
Assignees
Labels
font-rendering Font rendering issues *question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@ArturoDent
Copy link

ArturoDent commented Nov 6, 2019

With these settings:

    "editor.fontFamily": "Fira Code",
    "editor.fontLigatures": "true",

    "[javascript]": {
      "editor.fontLigatures": "'zero', 'ss02', 'ss03', 'ss04', 'ss05'",
    },

I get this in a javascript file:
stylisticSetGood

So all is good (the red squiggly is just about the experimental decorators support).

But if I add this setting:

"editor.letterSpacing": 0.2,

stylisticSetBad
I've lost the `ss02' set and the triple equals ligature.

And just for completeness here is what I get for just fontLigatures set to true with no stylistic sets included: (as expected)

NoStylisticSets

Should letterSpacing have this effect?

Version: 1.40.0-insider (user setup)
Commit: 515f496
Date: 2019-11-05T14:32:05.211Z
Electron: 6.1.2
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.19013

Does this issue occur when all extensions are disabled?: Yes

@alexdima alexdima self-assigned this Nov 6, 2019
@alexdima
Copy link
Member

alexdima commented Nov 6, 2019

I've noticed this works in combination with letter spacing only when enabling calt as well:

"editor.fontLigatures": "'zero', 'ss02', 'ss03', 'ss04', 'ss05', 'calt'",

@alexdima alexdima added font-rendering Font rendering issues *question Issue represents a question, should be posted to StackOverflow (VS Code) labels Nov 6, 2019
@vscodebot vscodebot bot closed this as completed Nov 6, 2019
@microsoft microsoft deleted a comment from vscodebot bot Nov 6, 2019
@ArturoDent
Copy link
Author

ArturoDent commented Nov 6, 2019

I am confused then. From the current release notes: "When configuring "editor.fontLigatures": true, VS Code would turn on liga and calt." So that no longer happens (if other stylistic sets are used), that 'calt' for instance is turned on when fontLigatures is true?

After v1.40 we will need to manually include 'calt' if we use other stylistic sets? Or are you just recommending that as a temporary workaround? If so, not many people will realize that.

Or is this an upstream issue?

@alexdima
Copy link
Member

alexdima commented Nov 7, 2019

@ArturoDent This is how it works:

  • "editor.fontLigatures": false => font-feature-settings: "liga" off, "calt" off;
  • "editor.fontLigatures": true => font-feature-settings: "liga" on, "calt" on;
  • "editor.fontLigatures": "customstring" => font-feature-settings: customstring;

So true and false are basic options for most users to enable ligatures. The advanced users that want full control over the font-feature-settings can gain full control by writing a string instead of a boolean.

I think it is best that we don't massage the provided string or try to append stuff to it. In other words, I would leave it as it is, if you want to use letter-spacing and advanced custom font-feature-settings, then you need to manually enable 'calt' in the font-feature-settings. I think this is good enough. If lots of people run into this we could try implementing a parser for font-feature-settings, and giving a warning if 'calt' is forgotten, but I wouldn't go there just yet.

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
font-rendering Font rendering issues *question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants