Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change font in Jupyter Notebook

How do I change font in Jupyter Notebook? I want to change the font in Jupyter Notebook and I am using Python 2.7

like image 677
Mihajlo.Gluhovic Avatar asked Jan 14 '18 14:01

Mihajlo.Gluhovic


People also ask

How do I make font bigger in Jupyter notebook?

Not sure how to change font sizes in jupyter notebook, but in jupyter lab, jupyter notebook's successor, you can change font sizes by going “settings” → “Advanced Settings Editor” → “codeCellConfig” → “fontSize”.

How do you change the font in Python?

Open the Python shell. Then, in the menu bar, under "Python" (directly to the right of the Apple icon), you will find "Preferences". Under this, you will find the "Font/Tabs" option, and you can change the font size according to your preference.


1 Answers

I know that you can do that with the jupyterthemes package. Please see below for a sample of how to install the package and change the font.

pip install jupyterthemes
# set font/font-size of markdown (text cells) and notebook (interface)
# see sans-serif & serif font tables below
jt -tf merriserif -tfs 10 -nf ptsans -nfs 13

You may find other fonts listed on the github repository.

The first purpose of this package is to change the theme of jupyter though. Maybe it would be the opportunity to try a background less aggressive for the eyes than the defautl one. I personnaly run :

jupyter-theme -t oceans16 -T
like image 148
MCMZL Avatar answered Oct 16 '22 09:10

MCMZL