LoginSignup
2
2

More than 5 years have passed since last update.

JupyterLabのフォント変更(Windows&Anaconda環境)

Posted at

環境

  • JupyterLab alpha release version: 0.28.5

今後は設定ファイルのJSONから簡単に変更できるようになるだろうなと思う。
Anacondaを導入していれば以下のコマンドでJupyterLabをインストールできる。

conda install -c conda-forge jupyterlab

関連

基本的に以下の記事を参考にしました。
MacでJupyterLabを試す(黒背景とフォント変更) - Qiita

変更方法

以下のパスにあるcssを変更する。

Anacondaへのパス\Anaconda3\share\jupyter\lab\themes\@jupyterlab

※以下のファイルを変更しても反映されない。

Anacondaへのパス\Anaconda3\Lib\site-packages\jupyterlab\themes\@jupyterlab\theme-light-extension
  1. themeLightを使っている場合は、theme-light-extension\variables.cssを開く。
  2. 90行目付近のContent Fontsを変更する。

一例(Ricty Diminishedはインストールする必要あるので、任意のフォントに)

  /* Content Fonts

  Content font variables are used for typography of user generated content.
  */

  --jp-content-font-size: 16px;
  --jp-content-line-height: 1.5;
  --jp-content-font-color0: black;
  --jp-content-font-color1: black;
  --jp-content-font-color2: var(--md-grey-700);
  --jp-content-font-color3: var(--md-grey-500);

  --jp-ui-font-scale-factor: 1.2;
  --jp-ui-font-size0: calc(var(--jp-ui-font-size1)/var(--jp-ui-font-scale-factor));
  --jp-ui-font-size1: 14px; /* Base font size */
  --jp-ui-font-size2: calc(var(--jp-ui-font-size1)*var(--jp-ui-font-scale-factor));
  --jp-ui-font-size3: calc(var(--jp-ui-font-size2)*var(--jp-ui-font-scale-factor));

  --jp-code-font-size: 16px;
  --jp-code-line-height: 1.307;
  --jp-code-padding: 5px;
  --jp-code-font-family: 'Ricty Diminished';
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2