MonoLisaFont / feedback

Send us your feedback regarding the MonoLisa font
84 stars 2 forks source link

Comments in VSCode do not look like script variants #175

Closed decisivedevops closed 1 year ago

decisivedevops commented 1 year ago

Background information

To help to debug, fill in the following information before describing the issue:

Issue

Comments in VSCode do not look like script variants.

On previous versions, comments were script versions.

I have the below config in VSCode.

    "editor.fontFamily": "MonoLisa",
    "editor.fontLigatures": "'ss02' on",
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": [
                    "comment",
                ],
                "settings": {
                    "fontStyle": "italic"
                }
            }
        ]
    },

I am using https://fontdrop.info/ for validation, and the Italics version shows the scripted variant correctly.

I tried all of your suggestions.

With the first link download,

  1. Either my complete code is getting scripted.

image

  1. Or the change is temporary. Once I restart the VSCode, the complete code gets scripted.

Before restart

image

After restart

image

Installed fonts:

image

bebraw commented 1 year ago

Either my complete code is getting scripted.

I'm on VS Code 1.74.0 and I'm using the first download on MacOS Ventura and I simply cannot reproduce the issue. Everything looks as expected even after restarting. Here's my configuration:

{
  "editor.fontFamily": "MonoLisa",
  "editor.fontVariations": true,
  "editor.fontWeight": 400,
  "editor.lineHeight": 16,
  "editor.fontLigatures": "'ss02' on",
  "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "scope": "comment",
        "settings": {
          "fontStyle": "italic"
        }
      }
    ]
  },
}

Most likely you can drop some lines from that without losing anything of value.

To debug locally, you could try Help -> Toggle Developer Tools and then locate the view with the settings to see what it's applying exactly. You could also try to start dropping bits like editor.tokenColorCustomizations to simplify configuration to see if it still applies script on everything.

It could be some cache issue or something weird. I would try upgrading VS Code at least.

decisivedevops commented 1 year ago

Either my complete code is getting scripted.

I'm on VS Code 1.74.0 and I'm using the first download on MacOS Ventura and I simply cannot reproduce the issue. Everything looks as expected even after restarting. Here's my configuration:

{
  "editor.fontFamily": "MonoLisa",
  "editor.fontVariations": true,
  "editor.fontWeight": 400,
  "editor.lineHeight": 16,
  "editor.fontLigatures": "'ss02' on",
  "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "scope": "comment",
        "settings": {
          "fontStyle": "italic"
        }
      }
    ]
  },
}

Most likely you can drop some lines from that without losing anything of value.

To debug locally, you could try Help -> Toggle Developer Tools and then locate the view with the settings to see what it's applying exactly. You could also try to start dropping bits like editor.tokenColorCustomizations to simplify configuration to see if it still applies script on everything.

It could be some cache issue or something weird. I would try upgrading VS Code at least.

any other IDE/ text editor this can be checked? I have PyCharm.

okonet commented 1 year ago
  1. If you download the font with the script enabled, it will apply script to all italics. This also means, ss02 won't be of any use since it will be already toggled on by default and removed from the font.
  2. VSCode is probably the only editor that supports OpenType features, so you should use a normal download (without selecting any OpenType features) and enable the ss02 only for comments. Not 100% sure how to do so though.
  3. PyCharm nor any other IntelliJ IDE has support for OpenType feautures. To use script variant there you should download a customized version of the font with ss02 enabled. I'd suggest naming it differently so you can install multiple fonts on your computer and choose them in different editors.
  4. If the VSCode config doesn't work for you, you can still try using two fonts one with ss02 enabled and one without. Choose the one with ss02 for the scope.
decisivedevops commented 1 year ago
  1. If you download the font with the script enabled, it will apply script to all italics. This also means, ss02 won't be of any use since it will be already toggled on by default and removed from the font.
  2. VSCode is probably the only editor that supports OpenType features, so you should use a normal download (without selecting any OpenType features) and enable the ss02 only for comments. Not 100% sure how to do so though.
  3. PyCharm nor any other IntelliJ IDE has support for OpenType feautures. To use script variant there you should download a customized version of the font with ss02 enabled. I'd suggest naming it differently so you can install multiple fonts on your computer and choose them in different editors.
  4. If the VSCode config doesn't work for you, you can still try using two fonts one with ss02 enabled and one without. Choose the one with ss02 for the scope.

Tried all the suggestions.

bebraw commented 1 year ago

To proceed with debugging, we would need a clear reproduction on MacOS since I cannot reproduce the issue on my system.

The weird point is that VS Code settings should render using regular, not italic, so it's hard to understand why it would apply script to it.

bebraw commented 1 year ago

To have a clean slate, I would remove any MonoLisa font you have installed at your Fonts directory and reinstall the default one (first download).

decisivedevops commented 1 year ago

Finally managed to fix this using extension - https://github.com/iocave/customize-ui

This is what I added to make comments using the ss02 variant font.

image