How can I change font size in Eclipse for ALL text editors?

I had to do a presentation yesterday, and as part of the presentation, I used Eclipse to show some code. Many of my coworkers in the room could not read the text and asked me to increase the size of the text for ALL files, not just Java files or XML files.

But it wasn't immediately obvious from the available options how to do this. I went to menu Window → Preferences and typed font in the search input. This filtered the options to General → Appearance → Colors and Fonts. From here, I could see an option to change the font in Java files, but I didn't know how to change the font globally.

I'm using Eclipse v4.3 Service Release 1 (Kepler) on Windows.

This is similar to Stack Overflow question How can I change font size in Eclipse for Java text editors?.


This is what we figured out, and this is also found in this answer and also this answer (I'll quote):

Go to Preferences → General → Appearance → Colors and Fonts, expand the "Basic" folder and select "Text Font" and change that to whatever size you like.

Pretty simple!

这是对话框的样子 - 点击编辑


The answer by @Jake works fine on the editor. To also change the font size of the global Eclipse GUI, I have added the follows:

*{font-size:8;} 

in the file:

ECLIPSE_HOME/plugins/org.eclipse.ui.themes_*/css/e4_default_gtk.css

worked for me. This is explained here: How to change eclipse font sizes


Eclipse provides a handy shortcut to shortcut for what is well explained in Jake Toronto answer (only by 2 points increments/decrements though).

On MacOS:

  • Increase by 2 points: command + "+"
  • Decrease by 2 points: command + "-"
  • On Windows/Fedora:

  • Increase by 2 points: CTRL + "+"
  • Decrease by 2 points: CTRL + "-"
  • 链接地址: http://www.djcxy.com/p/87474.html

    上一篇: 如何检测DIV的维度变化?

    下一篇: 如何在Eclipse中为所有文本编辑器更改字体大小?