How can I configure the font size for the tree item in the package explorer in Eclipse?

In 2010, there was no way in Eclipse to change the font used for Package Explorer and other such views. You can only change the font for editor views. This is a policy decision on the part of the Eclipse developers (see, e.g., bugs 49548, 202091). (Grumble.) The font used is the one set by the general look-and-feel for whatever desktop you are using.

On Linux it is possible to override the system font when you invoke Eclipse. An excellent writeup of various possibilities is here, to which I owe this answer. I’ll repeat one suggestion from there for posterity. Create a file named, say, gtkrc-eclipse:

style "eclipse" {
  font_name = "Sans Condensed 8"
}
class "GtkWidget" style "eclipse"

Then set a certain environment variable when invoking eclipse:

$ GTK2_RC_FILES=gtkrc-eclipse eclipse

Leave a Comment