Venkat
Venkat

Reputation: 21480

How to change font size in Eclipse for Java text editors?

I have just tried to change my font size in Eclipse 3.6.0 in the following way:

General → Appearance → Colors and Fonts → Java Editor text font

However, the font size only changed in the file I had open. How can I change the font size for all Java files and projects I open in Eclipse?

Upvotes: 503

Views: 772063

Answers (18)

BenniMcBeno
BenniMcBeno

Reputation: 2445

On Mac:

  1. Eclipse toolbar Eclipse → Settings OR Command + , (comma)

  2. GeneralAppearanceColors and FontsBasicText Font

  3. Apply

Upvotes: 75

DwB
DwB

Reputation: 38290

If you are changing the font size, but it is only working for the currently open file, then I suspect that you are changing the wrong preferences.

  • On the Eclipse toolbar, select WindowPreferences
  • Set the font size, GeneralAppearanceColors and FontsJavaJava Editor Text Font).
  • Save the preferences.

Check that you do not have per-project preferences. These will override the top-level preferences.

Eclipse v4.2 (Juno) note

Per comment below, this has moved to the Eclipse Preferences menu (no longer named the Window menu).

Eclipse v4.3 (Kepler) note

The Window menu is live again, that is, menu WindowPreferences.

Eclipse 2021-12 note

Verified that the path described (Window → Preferences, General → Appearance → Colors and Fonts → Java → Java Editor Text Font) is still correct.

Note Be sure to check out the ChandraBhan Singh's answer, it shows the key bindings to change the font size.

Upvotes: 469

Shubham Sharma
Shubham Sharma

Reputation: 2793

If you are using Windows then to increase font size try with

CtrlShift+

and for decreasing font size you can use

CtrlShift-

Upvotes: 20

shashi
shashi

Reputation: 400

Press ctrl + - to decrease, and ctrl + + to increase the Font Size.

It's working for me in Eclipse Oxygen.

Upvotes: 16

I Found the best way to increase Font Size in Eclipse:

Follow this path : Eclipse-Folder\plugins\org.eclipse.ui.themes_1.2.100.v20180514-1547\css

--There are a bunch of Files here and it depends on user system which file to change.

* {
  font-size:13;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: normal;
} 

you can even change Font Family if you like.

  1. For Windows Users add the following piece of css at BOTTOM of these files: File Names: e4_default_gtk.css & e4_default_win.css

  2. For Mac Users: e4_default_mac.css

Upvotes: 1

KayV
KayV

Reputation: 13835

If you are using STS, then goto STS/Contents/Eclipse directory and open the STS.ini file.

From the STS.ini file, remove the flooring line:

-Dorg.eclipse.swt.internal.carbon.smallFonts

And restart the STS.

Upvotes: 0

Usman
Usman

Reputation: 575

You can use

ctrl and + or - key

Upvotes: 1

praveenj
praveenj

Reputation: 359

Try the tarlog plugin. You can change the font through Ctrl++ and Ctrl-- commands with it. A very convenient thing.

https://code.google.com/archive/p/tarlog-plugins/downloads

Upvotes: 0

ChandraBhan Singh
ChandraBhan Singh

Reputation: 2971

For Eclipse Neon

To Increase Ctrl +

To reduce Ctrl -

shortcut for font eclipse

Upvotes: 96

Anand
Anand

Reputation: 49

  1. On the menu bar, select WindowPreferences
  2. Set the font size (GeneralAppearanceColors and FontsStructured Text EditorsStructured Text Editor Text Font (set to default: Text Font)Edit...).
  3. Save the preferences.

Upvotes: 4

Naveed Ahmad
Naveed Ahmad

Reputation: 6737

The Eclipse-Fonts extension will add toolbar buttons and keyboard shortcuts for changing font size. You can then use AutoHotkey to make Ctrl + mousewheel zoom.

Under menu HelpInstall New Software... in the menu, paste the update URL (http://eclipse-fonts.googlecode.com/svn/trunk/FontsUpdate/) into the Works with: text box and press Enter. Expand the tree and select FontsFeature as in the following image:

Eclipse extension installation screen capture

Complete the installation and restart Eclipse. Then you should see the A toolbar buttons (circled in red in the following image) and be able to use the keyboard shortcuts Ctrl + - and Ctrl + = to zoom (although you may have to unbind those keys from Eclipse first).

Eclipse screen capture with the font size toolbar buttons circled

To get Ctrl + mouse wheel zooming, you can use AutoHotkey with the following script:

; Ctrl + mouse wheel zooming in Eclipse.
; Requires Eclipse-Fonts (https://code.google.com/p/eclipse-fonts/).
; Thank you for the unique window class, SWT/Eclipse.
;
#IfWinActive ahk_class SWT_Window0
    ^WheelUp:: Send ^{=}
    ^WheelDown:: Send ^-
#IfWinActive

Upvotes: 20

ThmHarsh
ThmHarsh

Reputation: 601

Enter image description here

Menu WindowPreferences. GeneralAppearanceColors and FontsBasicText Font

Upvotes: 13

Donald W. Smith
Donald W. Smith

Reputation: 101

Running Eclipse v4.3 (Kepler), the steps outlined by AlvaroCachoperro do the trick for the Java text editor and console window text.

Many of the text font options, including the Java Editor Text Font note, are "set to default: Text Font". The 'default' can be found and configured as follows:

On the Eclipse toolbar, select WindowPreferences. Drill down to: (GeneralAppearanceColors and FontsBasicText Font) (at the bottom)

  • Click Edit and select the font, style and size
  • Click OK in the Font dialog
  • Click Apply in the Preferences dialog to check it
  • Click OK in the Preferences dialog to save it

Eclipse will remember your settings for your current workspace.

I teach programming and use the larger font for the students in the back.

Upvotes: 3

user2559897
user2559897

Reputation: 111

On the Eclipse toolbar, select WindowPreferences, set the font size (GeneralAppearanceColors and FontsBasicText Font).

Save the preferences.

Upvotes: 11

user3018137
user3018137

Reputation: 31

I tend to use menu WindowsPreferencesGeneralAppearancesColors and FontsJava Text EditorsChangeApply.

Upvotes: 1

AlvaroCachoperro
AlvaroCachoperro

Reputation: 740

This worked for me:

  1. On the Eclipse toolbar, select WindowPreferences.

  2. Set the font size (GeneralAppearanceColors and FontsBasicText Font):

    Enter image description here

  3. Save the preferences.

Upvotes: 61

Venugopal Madathil
Venugopal Madathil

Reputation: 2021

You can have a look at Eclipse color theme, also which has a hell of a lot of options for customizing font, background color, etc.

Upvotes: 4

Sumit Singh
Sumit Singh

Reputation: 15886

General → Appearance → Colors and Fonts → Java Editor text font

See the image:

enter image description here

Upvotes: 33

Related Questions