Vscode: Support fontName in textMateRules

Created on 18 Oct 2017  路  11Comments  路  Source: microsoft/vscode

This is a feature request, and I am not sure how it will be received. Probably not overwhelmingly positive, but nonetheless:

I would like to have support to change font family in my textmate theme. Right now you support fontStyle, fontSize and foreground. I believe the correct term is fontName as per https://github.com/textmate/markdown.tmbundle/issues/7 which would control the css font-family property,

E g something like

  "editor": {
    "fontFamily": "Fira Code",
    "fontSize": "16",
    "tokenColorCustomizations": {
      "textMateRules": [
        {
          "name": "Variables",
          "scope": "variable",
          "settings": {
            "fontName": "Script12 BT",
          }
        }
      ]
    }
  }

This would be in order to conditionally change font-family and be able to support more creative themes.

editor-theming feature-request

Most helpful comment

Any chance this gets on the radar? Would be super awesome to have it.

All 11 comments

. o O (seems odd to allow fontName in a section named tokenColorCustomizations)

fontStyle is already available there

letter-spacing is also extremely helpful when working with multiple fonts so you can adjust to consistent size of characters and then tweak the spacing to make sure columns line up as closely as possible. It worked really nicely in Atom before I switched to VSC.

It's a very useful feature for CJK comments, because it's very strange to change CJK characters into italic style or bold style.
I think it is a common problem for all languages with non-alphanumeric characters. If I just change its style a little, either the characters becomes hard-to-read (ie. italic style), or the difference is is too small to be easily distinguished (ie. bold style).

Any chance this gets on the radar? Would be super awesome to have it.

Any progress on this feature?

Just checking for any possible changes?

I need this feature too, and I think also need fontSize, letterSpace, and baselineOffset attributes for aligning different font in the same line.

I wanted a custom font for comments, and after browsing for a few hours (Yes, I do want cursive comments) it seems one is left with three options:

  • Lay out 200$ to install Operator Mono which, when you think about is, is kind of a hack;
  • Use Custom CSS and JS loader extension, let it run your VS Code as a privileged user to alter your files (Which in my book is yuck);
  • Wait for this feature request.

I'm not rich, I'm not running things as root, so any progress? :smile:
I'm eager to contribute/document/test/whatever.
Edit: I'm experimenting with this.

I need this 馃檹

Was this page helpful?
0 / 5 - 0 ratings