当前位置:主页 > 软件编程 > Python代码 >

Jupyter notebook如何修改平台字体

时间:2021-01-06 11:21:49 | 栏目:Python代码 | 点击:

Jupyter平台默认开发的字体为宋体,在高分屏下视觉效果差

在 C:\User\用户名\.jupyter\custom下面的custom.css中,修改字体


PS:如果没有这些文件,或者没有custom这个文件夹,可以手动建立这些文件

在custom.css文本中,添加下面内容:

div.notebook {font-family: Consolas, "Microsoft YaHei Mono", "Microsoft YaHei";}
div.CodeMirror pre {font-family: Consolas, "Microsoft YaHei Mono", "Microsoft YaHei"; font-size: 10pt;}
div.output_area pre {font-family: Consolas, "Microsoft YaHei Mono", "Microsoft YaHei"; font-size: 10pt;}
div.input_prompt {font-family: Consolas, "Microsoft YaHei Mono", "Microsoft YaHei"; font-size: 10pt;}
div.out_prompt_overlay {font-family: Consolas, "Microsoft YaHei Mono", "Microsoft YaHei"; font-size: 10pt;}
div.prompt {font-family: Consolas, "Microsoft YaHei Mono", "Microsoft YaHei"; font-size: 10pt;}
span.cm-comment {font-family: Consolas, "Microsoft YaHei Mono", "Microsoft YaHei" !important; font-style:normal !important;}
code {font-family: Consolas, "Microsoft YaHei Mono", "Microsoft YaHei";}

您可能感兴趣的文章:

相关文章