【发布时间】:2018-12-14 00:00:40
【问题描述】:
我想更改 jupyterlab 中所有单元格的默认 fontFamily。我能够在高级设置编辑器中编辑代码、降价和原始单元格的配置。但输出单元格仍使用默认的 SourceCodePro 字体。有没有办法改变它?
【问题讨论】:
标签: jupyter-lab
我想更改 jupyterlab 中所有单元格的默认 fontFamily。我能够在高级设置编辑器中编辑代码、降价和原始单元格的配置。但输出单元格仍使用默认的 SourceCodePro 字体。有没有办法改变它?
【问题讨论】:
标签: jupyter-lab
显然这个功能还没有实现。见这里:https://github.com/jupyterlab/jupyterlab/issues/5764
我通过首先安装扩展 jupyterlab-fonts 然后将文件 ~/.jupyter/lab/user-settings/@deathbeds/jupyterlab-fonts/fonts.jupyterlab-settings 中的 --jp-code-font-family 参数更改为这个来解决这个问题:
{
// Fonts
// @deathbeds/jupyterlab-fonts:fonts
// Settings for JupyterLab Fonts
// *********************************
// Global Styles
// JSS-compatible JSON applied to the Global scope
"styles": {
":root": {
"--jp-code-font-family": "monospace"
}
}
}
【讨论】:
在jupyterlab中打开settings>Theme,在overides上改code-font-family
{
"overrides": {
"code-font-family": "monospace",
"code-font-size": "13px"
}
}
【讨论】: