gitpod-io / openvscode-server

Run upstream VS Code on a remote machine with access through a modern web browser from any device, anywhere.
https://www.gitpod.io/
MIT License
4.99k stars 431 forks source link

Fira Code font support #389

Closed hobgoblina closed 2 years ago

hobgoblina commented 2 years ago

Android users have limited capacity to install fonts on Android devices. I'd like to use Fira Code while working from an android tablet.

I'm able to use Fira Code in vscode for the web (including ligatures and without it being installed on my host machine) by injecting this css line using dev tools: @import url(https://cdn.jsdelivr.net/npm/firacode@6.2.0/distr/fira_code.css);

Would be great if Fira Code could get native support for Gitpod's browser IDEs. Fira Code is a popular open-source monospace font that's already supported by some other web-based dev projects like CodePen.

filiptronicek commented 2 years ago

Hey there @necropolina 👋!

Fira Code is easily set as your typeface in VS Code if you already have it installed on the client you're opening Gitpod from with the following snippet in your user settings:

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

As for using a font that's external, I don't think that's possible right now (I am not concrete about this). This sounds like something that would benefit VS Code itself, though, so feel free to raise an issue about adding external font support on https://github.com/microsoft/vscode.

hobgoblina commented 2 years ago

I'm already using Fira Code with vs code/gitpod on laptop/desktop.

Android comes with limitations, tho. It's impossible to install fonts without rooting your device, and there aren't any Android web browsers that allow custom fonts/css.

I created an issue on microsoft's vs code repo. But was hoping that Gitpod might be more responsive than Microsoft, given that their repo has >5k issues.

hobgoblina commented 2 years ago

Realized that Tampermonkey can be installed for the Firefox Nightly app, so I wrote this lil script that imports the Fira Code font: https://gist.github.com/necropolina/8024db5a3ce16b3c78b579ced0344c51

And it also full-screens gitpod.io pages on tap/click, so anyone wanting to use this will need to remove that if full-screen isn't wanted.