You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like the ability to have the ability to have the font I use for all my development FireCode to be included so its pushed to the client.
I'm not really a star when it comes to CSS, but maybe this would be possible with something like a @font-face which would push the font to the client. Then when you configure the font in Code, because its pushed to the client you can have the FireCode font and ligatures without installing the font on the client.
I would also accept solutions from anyone, how to hack some files to get this working.
You can do this with a Cloudflare app in front of your sub domain for code. Works pretty well. Was not able to find a way to do it via reverse proxy/etc.
Reacted by Olivier Benz, Marius van Niekerk, akash-anchor, Alexander A. Prokhorov, Stefan Kuhn, Robert Rosca, Ikhsan Hadi Nugroho, Yankel Scialom, cawnsiwup and Mubelotix
And then I had to locate the main CSS file which was in:
/opt/homebrew/Cellar/code-server/4.17.1/libexec/lib/vscode/out/vs/workbench/workbench.web.main.css
and add something like @import "/my_extras/path/to/stylesheet.css";
That would include the necessary @font-face directives pointing to locally-installed font files. And yes, works on iPad!
If yoy are using a docker image,
Create a dockerfile.
```
FROM containerimage
RUN commands to apply the patches
```
And then use that new.Docker image built
FROM basically says use this image as a base for these changes
If yoy are using a docker image, Create a dockerfile. FROM containerimage RUN commands to apply the patches And then use that new.Docker image built FROM basically says use this image as a base for these changes …
On Tue, Sep 24, 2024, 12:29 PM Prateek Mohanty @.> wrote: Hey Does anyone have any idea how to do it with the latest build? I am using docker-compose with image lscr.io/linuxserver/code-server:latest. — Reply to this email directly, view it on GitHub <#1374 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPQOXU3VCZETNFAC5OTI4TZYG4QTAVCNFSM6AAAAABKIDKOKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZSGE4DKOBZGE . You are receiving this because you were mentioned.Message ID: @.>
i'm using brave and after some struggle, it was (magically) showing the custom font fine until yesterday ... then today i had to delete the container and start afresh and haven't been able to get it to work...
then i switched over to edge and voila! the custom font was working, so it is a browser issue,
so just change your browser's monospace font to the desired one and use monospace everywhere in code-server
i'm using brave and after some struggle, it was (magically) showing the custom font fine until yesterday ... then today i had to delete the container and start afresh and haven't been able to get it to work...
then i switched over to edge and voila! the custom font was working, so it is a browser issue,
so just change your browser's monospace font to the desired one and use monospace everywhere in code-server
@surajsharma for issue with Brave, I think it was related to the Block fingerprinting settings had been enabled.
Please try to access the brave://settings/shields in address bar and turn off that option, and reload the editor again to see if it works. (FYI that it worked for me)
Activity
[-]Feature: add font-firacode[/-][+]Allow custom fonts[/+]Just-Insane commentedon Feb 27, 2020
You can do this with a Cloudflare app in front of your sub domain for code. Works pretty well. Was not able to find a way to do it via reverse proxy/etc.
nhooyr commentedon Feb 27, 2020
I would agree it should be a first class feature as fonts are a big part of editor customization and development.
kylecarbs commentedon Feb 27, 2020
Will make this a priority. Agreed it's a big one.
gjrtimmer commentedon Mar 5, 2020
Thank you, it would really help at lot of people.
demyxco commentedon Mar 5, 2020
This would be an amazing feature so I can finally include a powerline font that would go great with Oh My Zsh.
Merith-TK commentedon Mar 10, 2020
@Just-Insane you say this is possible with cloudflare? where and how?
Just-Insane commentedon Mar 10, 2020
Under the Apps section for your domain in Cloudflare, you should find an app called "Add CSS" developed by Cloudflare Labs.
In the settings for this app, you select your subdomain that code-server is running on, and then enter the CSS:
I don't exactly remember where I found this from (CDN URL in the CSS), but the overall CSS file is available on github: https://github.com/tonsky/FiraCode/blob/master/distr/fira_code.css
Merith-TK commentedon Mar 10, 2020
neat, is it possible to make this an extension? to load a font off the internet?
kylecarbs commentedon Mar 10, 2020
@Just-Insane very cool. Great workaround for now!
Just-Insane commentedon Mar 10, 2020
There is probably a way you can intercept the pages using nginx/Apache as a reverse proxy, but I wasn’t able to get it working in the time I had.
Merith-TK commentedon Mar 13, 2020
@Just-Insane does this enable font ligatures? like converting => to the special char?
Just-Insane commentedon Mar 13, 2020
gyzerok commentedon May 13, 2020
For me using FiraCode just works.
I am using macOS and I've added FiraCode to the OS. Probably if you register the font with other OSes it will work as well.
67 remaining items
benz0li commentedon May 30, 2023
I successfully use https://github.com/b-data/jupyterlab-r-docker-stack/blob/15f737a88b40ff76b1b61c28210d557fd39aca40/base/latest.Dockerfile#L209-L214.
ℹ️ Release:
code-server-4.13.0-linux-amd64.tar.gz; installation path:/opt/code-server; assets at<installation-path>/src/browser/mediaCheck out https://demo.jupyter.b-data.ch. Login with GitHub account.
@J4gQBqqR File location may change over time, so you have to adapt your script.
jaredcwhite commentedon Oct 19, 2023
For anyone looking for a solution using Caddy reverse proxy on macOS (as I happen too), here you go! In Caddyfile:
And then I had to locate the main CSS file which was in:
/opt/homebrew/Cellar/code-server/4.17.1/libexec/lib/vscode/out/vs/workbench/workbench.web.main.css
and add something like
@import "/my_extras/path/to/stylesheet.css";That would include the necessary
@font-facedirectives pointing to locally-installed font files. And yes, works on iPad!dotNetCory commentedon Dec 7, 2023
You know, this would be really handy to set up for accessibility reasons
Merith-TK commentedon Dec 7, 2023
or atleast an varient to what @jaredcwhite did, where the applications CSS automatically loads an customizations folder
demyxco commentedon Dec 7, 2023
Sorry for the late reply but the file I modified is
workbench.html, see more in my repo https://github.com/demyxsh/code-server/blob/1447f123bdf31abe70a7394ffe062da7a1674cf2/tag-browse/Dockerfile#L112-L127simon-bueler commentedon Jul 2, 2024
@demyxco Does it work in Safari on iPad if so, how did you get it to work? For me it only works in other browsers.
demyxco commentedon Jul 2, 2024
@simon-bueler seems to be broken in Safari.
StrangeNoob commentedon Sep 24, 2024
Hey
Does anyone have any idea how to do it with the latest build? I am using docker-compose with image lscr.io/linuxserver/code-server:latest.
Merith-TK commentedon Sep 24, 2024
StrangeNoob commentedon Sep 24, 2024
I have tried to do something like this
With script file is like
I have changed the settings but it didn't work.
{ "editor.fontWeight": "normal", "editor.fontLigatures": true, "terminal.integrated.fontFamily": "'MesloLGS NF'", "terminal.integrated.fontSize": 16, "editor.fontFamily": "'FiraCode Nerd Font'", }But if I tried to access the list of font installed. Its showing FiraCode
SherkeyXD commentedon Feb 19, 2025
Perhaps it would be a good idea to provide a link to this issue in the FAQ section of the documentation?
surajsharma commentedon Mar 22, 2025
i'm using brave and after some struggle, it was (magically) showing the custom font fine until yesterday ... then today i had to delete the container and start afresh and haven't been able to get it to work...
then i switched over to edge and voila! the custom font was working, so it is a browser issue,
so just change your browser's monospace font to the desired one and use
monospaceeverywhere in code-serversokomo commentedon Mar 27, 2025
@surajsharma for issue with Brave, I think it was related to the Block fingerprinting settings had been enabled.
Please try to access the
brave://settings/shieldsin address bar and turn off that option, and reload the editor again to see if it works. (FYI that it worked for me)