8

I'm trying to reduce the font sizes used in Eclipse. I've read several notes talking about how to do this, but none of them have made a difference.

Obviously, changing it in Eclipse preferences doesn't do it.

The common answers about using "Appearance->Fonts" doesn't work, because there is no "Fonts" tab. I believe I saw one person say that the "Fonts" tab isn't supposed to be there anymore.

The next suggestion is to install MyUnity and change the font settings there. That appeared to change the fonts used in other apps, like gnome-terminal and window headers, but it still has had no effect on Eclipse.

1

7 Answers 7

6

Try this:

Edit e4_default_gtk.css.

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

Add at the end:

* {
  font-size:8;
} 

Save and start Eclipse.

This worked for me on Ubuntu 14.04 and Eclipse Luna.

3
  • worked like a charm. All font sizes became smaller.
    – Evan Hu
    Aug 20, 2016 at 1:01
  • vim ECLIPSE_HOME/plugins/org.eclipse.ui.themes_*/css/e4_default_gtk.css isn't meant to be copy-pasted literally right? This opens a empty file for me.
    – MadMike
    Mar 22, 2017 at 14:06
  • You may need to edit a different file depending on your active theme, e.g. css/e4-dark.css.
    – mapm
    Aug 31, 2019 at 2:11
5

I figured out the missing pieces of this. The hard part is controlling the font size for the non-editor views, like the package explorer. I discovered the following, which did the trick for me:

Smaller font sizes for Eclipse on Linux

2

In Eclipse Oxygen release (and later), the CSS files have been refactored and the base font-size style should now be edited in e4_basestyle.css.

1

go to menu Window -> Preferences, here go to General -> Appearance -> Colors and Fonts, this show configurations for perspectives, like java. In java option, select The Java editor text font is used by Java editors. and after Edit ... button, here you can change the font propieties.

5
  • 5
    When I said "Obviously, changing it in Eclipse preferences doesn't do it", that means I already tried that. Jun 28, 2012 at 2:03
  • so what you need ? the answer changes the font, i test. Jun 28, 2012 at 2:26
  • Ok, you're right, that changes the editor view. However, I appear to be unable to change the font size for the other views. Jun 28, 2012 at 15:46
  • you want change the font of all IDE (menu, panel, etc) ? Jun 28, 2012 at 16:00
  • That's the idea, yes. Jun 28, 2012 at 23:05
1

I tried Myunity on ubuntu12.04 64bit and it worked. If you change system font it affects the fonts of eclipse in menus and tabs. For the text contents in text editors of eclipse you should change font settings from properties page of eclipse itself.

1

Follow this steps:

  • Open Preferences under window menu:

enter image description here

  • Go to GeneralEditorsText Editors

enter image description here

  • Select Colors and Fonts blue link under Text Editors

enter image description here

  • Now you will see this window.

enter image description here

  • Just pess Edit and resize your text font

enter image description here


You can also find it from GeneralAppearanceColors and Fonts then select Text Font under Basic option.

enter image description here

0

According to the Eclipse page Tweaking SWT’s auto-scaling:

On GTK, the standard way to change to scaling for an individual application is to set GDK_DPI_SCALE environment variable before launching the application:

$ GDK_DPI_SCALE=1.25 ./eclipse

1.25 might be too large, so adjust it to your needs. You can even make the Eclipse font size smaller this way, say, 75% smaller than the default Interface font size; for example:

$ GDK_DPI_SCALE=.75 ./eclipse

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .