How to change eclipse font sizes

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

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

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

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.

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

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.

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

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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like