如何在 Eclipse 中更改 Python 代码的默认字体?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9868711/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 17:54:11  来源:igfitidea点击:

How do I change the default font for Python code in Eclipse?

pythoneclipsepydev

提问by bnguyen82

In Eclipse, how can I change default font for Python code in the editor (PyDev plugin)?

在 Eclipse 中,如何在编辑器(PyDev 插件)中更改 Python 代码的默认字体?

I navigate to menu WindowPreferenceGeneralAppearanceColors & Fonts, but I don't find which item would affect the Python code font.

我导航到菜单WindowPreferenceGeneralAppearanceColors & Fonts,但我没有找到哪个项目会影响 Python 代码字体。

回答by gecco

As you are using PyDev, you should have a look at menu WindowPreferencesPyDevEditor(PyDev Editor Preferences).

当您使用PyDev 时,您应该查看菜单WindowPreferencesPyDevEditor( PyDev Editor Preferences)。

回答by Abhishek Upadhyaya

This is for Mac:

这适用于 Mac:

Go to Eclipse → PreferencesGeneralAppearanceColors and FontsBasicText Font.

转到 Eclipse → PreferencesGeneralAppearanceColors and FontsBasicText Font

Edit the font structure for the text font.

编辑文本字体的字体结构。

Screen shot for the process

过程截图

回答by bnguyen82

Following the guidance of gecco, I found out the item in GeneralAppearanceColors & Fontswhich affects Python code fonts. It's Text Fontin the Basicfolder.

gecco的指导下,我在GeneralAppearanceColors & Fonts中找到了影响 Python 代码字体的项目。它的文本字体基本文件夹。

回答by Robert Casey

On a Mac, I can get to the PyDev settings via:

在 Mac 上,我可以通过以下方式进入 PyDev 设置:

Eclipse → PreferencesPyDev(in tree) → Editor(subtree)

Eclipse →首选项PyDev(在树中)→编辑器(子树)

In my case, I wanted to change hash tag comments from nearly invisible grey to a better color. It worked like a charm.

就我而言,我想将哈希标签注释从几乎不可见的灰色更改为更好的颜色。它就像一个魅力。