14

I want to change the default font (to Gill sans) that displays in Jupyter, but am having problems knowing where I go to edit it.

I have looked in the .ipython folder and I have no Static folder, and I have looked in the .jupyter folder and it is empty.

Does anyone know?

Nicholas
  • 3,517
  • 13
  • 47
  • 86

3 Answers3

17

You can modify the styles of Jupyter notebook by adding values to the file in;

.jupyter\custom\custom.css

If the custom dir isn't in .jupyter just make it and add custom.css in it.

In your new blank custom.css file you can add something like this to change the font for the code mirror;

.CodeMirror pre, .CodeMirror-dialog, .CodeMirror-dialog .CodeMirror-search-field, .terminal-app .terminal {
    font-family: YOUR-FAV-FONT;
    font-size: 12pt;
}

Here is a example of a pimped out custom.css. It's from my one-dark-notebook repo on github. feel free to clone/fork it and do whatever.

Mehdi
  • 1,260
  • 2
  • 16
  • 36
James Draper
  • 5,110
  • 5
  • 40
  • 59
5

You can change font size, background themes, cell widths etc.. from the command line. Check out the following GitHub page. https://github.com/dunovank/jupyter-themes

user3687197
  • 181
  • 1
  • 4
3

You can set defalut font at: /.jupyter/jupyter_qtconsole_config.py or from the command line. Check out this document (page 23) for a command line example https://media.readthedocs.org/pdf/qtconsole/latest/qtconsole.pdf

msalperen
  • 135
  • 8