无法在IPython Qt控制台中更改字体大小

3

我尝试根据stackoverflow上这个回答来更改ipython qtconsole的字体大小,但是无论我如何更改~/.ipython/profile_default/ipython_config.py文件中的内容,字体大小都没有变化。

➜  ~  ipython profile locate
/home/nick/.ipython/profile_default

➜  ~  head .ipython/profile_default/ipython_config.py 
# Configuration file for ipython.
c = get_config()    
c.IPythonWidget.font_size = 16
c.IPythonWidget.font_family = 'Source Code Pro'

➜  ~  uname -a
Linux nick-thinkpad 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:13:28 CET 2015 x86
_64 GNU/Linux                                                                  

➜  ~  ipython --version
4.0.0

令我惊奇的是,ipython qtconsole --ConsoleWidget.font_size=16 能够正常运行。我的配置有什么问题吗?
1个回答

5

从版本4.0开始,ipython qtconsole已被弃用(因为大分离)。相反,请使用jupyter qtconsole。您可以通过在~/.jupyter/jupyter_qtconsole_config.py中添加c.ConsoleWidget.font_size = 12来设置字体大小(这也会设置ipython qtconsole的字体大小)。 请注意,在jupyter中存在一个bug,它不允许您自动创建默认配置文件。目前,您需要手动创建该文件。


感谢您提供有关 ipython -> jupyter 的信息以及解决此困境的方案。 - Nick

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接