Skip to content

editor.fontFamily Support #760

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

Closed
drewcovi opened this issue Jun 10, 2019 · 8 comments
Closed

editor.fontFamily Support #760

drewcovi opened this issue Jun 10, 2019 · 8 comments
Labels
enhancement Some improvement that isn't a feature

Comments

@drewcovi
Copy link

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)

@drewcovi drewcovi added the enhancement Some improvement that isn't a feature label Jun 10, 2019
@drewcovi drewcovi changed the title Editor Font Support editor.fontFamily Support Jun 10, 2019
@deansheather
Copy link
Member

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.

@yw662
Copy link

yw662 commented Jun 26, 2019

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/[email protected]/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.

@gjrtimmer
Copy link

@yw662 where would I make this change ?

@HenrikSolver
Copy link

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

@nhooyr
Copy link
Contributor

nhooyr commented Jan 30, 2020

Thank yo @HenrikSolver and @yw662 for answering

@nhooyr nhooyr closed this as completed Jan 30, 2020
@SuperSandro2000
Copy link
Contributor

If anyone is here for JetBrains Mono

    "editor.fontFamily": "JetBrains Mono, Consolas, 'Courier New', monospace",
    "editor.fontLigatures": true,

@HenrikSolver
Copy link

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

@nhooyr
Copy link
Contributor

nhooyr commented Apr 9, 2020

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
Labels
enhancement Some improvement that isn't a feature
Projects
None yet
Development

No branches or pull requests

7 participants