Smaller Fonts in Eclipse under Linux

Published: by Creative Commons Licence

Time to read: Less than 1 minute

In Linux the package menus in Eclipse have very large vertical spacing and the font is large. It's a waste of valuable Space for the code window. With the following trick the font and font size is customizable. This also affects dialog elements such as buttons and the menu font.

Tested in Eclipse Juno and Kepler.

Eclipse on Linux uses gtk. To make the change, create a file (e.g. with the name .gtkrc-eclipse) in the home directory with the following content:

style "eclipse" {
  font_name = "Bitstream Vera Sans 8"
}
class "GtkWidget" style "eclipse"

After that, the start link to Eclipse has to be adjusted:

  1. right click on link, tab Program and enter the following in the Command field:

     env GTK2_RC_FILES=/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:$HOME/.gtkrc-eclipse '/<PFAD_ZU_ECLIPSE>'
    

Source: