Skip to content

ChromeOS Terminal

Thiago Perrotta edited this page Aug 9, 2021 · 17 revisions

In the terminal:

  1. Use the keyboard shortcut CTRL + SHIFT + J to open the JavaScript Console.
  2. Copy & paste the following:
term_.prefs_.set('user-css-text', `@font-face{\n    font-family: 'Fira Code';\n    src: url('https://raw.githubusercontent.com/tonsky/FiraCode/5.2/distr/woff2/FiraCode-Regular.woff2') format('woff2'),\n         url('https://raw.githubusercontent.com/tonsky/FiraCode/5.2/distr/woff/FiraCode-Regular.woff') format('woff'),\n         url('https://raw.githubusercontent.com/tonsky/FiraCode/5.2/distr/ttf/FiraCode-Regular.ttf') format('truetype');\n    font-weight: normal;\n    font-style: normal;\n}\n\n* {\n    -webkit-font-feature-settings: "liga" on, "calt" on;\n    -webkit-font-smoothing: antialiased;\n    text-rendering: optimizeLegibility;\n    font-family: "Fira Code", "PT Mono", "DejaVu Sans Mono", "Noto Sans Mono", "Everson Mono", FreeMono, Menlo, Terminal, monospace;\n}`)
  1. There is no step 3!
  • Note, there is a bug where you need to push ctrl-0 to get the cursor to input text at the right place. The following settings fix that bug, but the cursor is still in the wrong place:
@font-face{
    font-family: 'Fira Code';
    src: url('https://raw.githubusercontent.com/tonsky/FiraCode/5.2/distr/woff2/FiraCode-Regular.woff2') format('woff2'),
         url('https://raw.githubusercontent.com/tonsky/FiraCode/5.2/distr/woff/FiraCode-Regular.woff') format('woff'),
         url('https://raw.githubusercontent.com/tonsky/FiraCode/5.2/distr/ttf/FiraCode-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

x-screen {
    --hterm-charsize-height: calc(1em + 5px);
    --hterm-charsize-width: calc(1em * 0.6);
}

* {
    -webkit-font-feature-settings: "liga" on, "calt" on;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-family: 'Fira Code';
}

If there are any ideas on how to fix this completely, please add notes on the bug report: https://github.com/tonsky/FiraCode/pull/750

Clone this wiki locally