Skip to content

editor.fontFamily Support #760

Closed
Closed

Description

@drewcovi

At present it doesn't appear that you can install a local font (Fira Code) and have it presented as an editor font in the browser.

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

only converts the fonts to serifs (unknown font)

Activity

  1. added
    enhancement
    on Jun 10, 2019
  2. changed the title [-]Editor Font Support[/-] [+]editor.fontFamily Support[/+] on Jun 10, 2019
  3. deansheather commented on Jun 11, 2019

    @deansheather
    Collaborator

    Try:

    {
        "editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
        "editor.fontLigatures": true
    }
    

    Make sure that Fira Code is installed to the machine accessing code-server in the browser, not the server (as it's the client browser that renders the fonts). I don't have any issues using Fira Code with code-server.

  4. yw662 commented on Jun 26, 2019

    @yw662

    There is an alternative way to let your browser use fira code fonts, as long as you can use user style.

    • add this user style to the domain/URLs of code-server:
      @import url(https://cdn.jsdelivr.net/gh/tonsky/FiraCode@1.206/distr/fira_code.css);

    Maybe this can be done directly by code-server, so that there is no need for extra efforts on client/browser side.

  5. gjrtimmer commented on Dec 11, 2019

    @gjrtimmer

    @yw662 where would I make this change ?

  6. HenrikSolver commented on Dec 21, 2019

    @HenrikSolver

    @gjrtimmer Install the stylus extension in chrome and add a "style" for the url where you access code-server. In my case it is http://penguin.linux.test:8080 (I am running code-server in crostini on a chromebook). Add the line @yw662 suggests to the style.

  7. nhooyr commented on Jan 30, 2020

    @nhooyr
    Contributor

    Thank yo @HenrikSolver and @yw662 for answering

  8. SuperSandro2000 commented on Feb 16, 2020

    @SuperSandro2000
    Contributor

    If anyone is here for JetBrains Mono

        "editor.fontFamily": "JetBrains Mono, Consolas, 'Courier New', monospace",
        "editor.fontLigatures": true,
    
  9. HenrikSolver commented on Apr 9, 2020

    @HenrikSolver

    It seems that this trick doesn't work with 3.0.2. Maybe it is caused by #1470 .

  10. nhooyr commented on Apr 9, 2020

    @nhooyr
    Contributor

    We have an open issue re this at #1374

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions