Skip to content

Instantly share code, notes, and snippets.

@izzqz
Last active October 3, 2023 00:08
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
How to setup JetBrains Mono Nerd Font with ligatures to use is inside crostini terminal #guide

Setup Nerd Fonts in Chrome OS terminal

Press Ctr + Shift + j to open devtools console in crostini terminal.

Paste this to use Jetbrais Mono with ligatures:

term_.prefs_.set('font-family', 'JetBrains Mono Nerd Font, monospace');
term_.prefs_.set('user-css-text', '@font-face {font-family: "JetBrains Mono Nerd Font"; src: url("https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/JetBrainsMono/Ligatures/Regular/JetBrainsMonoNerdFont-Regular.ttf"); font-weight: normal; font-style: normal;} x-row {text-rendering: optimizeLegibility;font-variant-ligatures: normal;}')
  • To change font, replace url path to raw .ttf file with your font in Nerd Fonts repository.
  • To remove ligatures, delete x-row class in user-css-text parameter.
@fabiomen10
Copy link

Thanks for share @izzqz
But I'm having this problem.
image

Can you answer me any tip?

@izzqz
Copy link
Author

izzqz commented Oct 3, 2023

Also, this guide seems outdated for the latest version of chromeos. I can't open the console inside of it, and chrome-untrusted://terminal/ can't be opened in the browser. Looks like there is no way to use custom fonts... 😕

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