[java] 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?

This question is related to java eclipse fonts font-size

The answer is


On Mac:

  1. Eclipse toolbar Eclipse ? Preferences OR Command + , (comma)

  2. General ? Appearance ? Colors and Fonts ? Basic ? Text Font

  3. Apply


If you are using windows then try with CTRL,SHIFT,+ and for decreasing font size you can use CTRL,SHIFT,-


You can use

ctrl and + or - key


I tend to use menu Windows ? Preferences ? General ? Appearances ? Colors and Fonts ? Java Text Editors ? Change ? Apply.


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.


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

See the image:

enter image description here


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 Window ? Preferences
  • Set the font size, General ? Appearance ? Colors and Fonts ? Java ? Java 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 Window ? Preferences.

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


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

It's working for me in Eclipse Oxygen.


This worked for me:

  1. On the Eclipse toolbar, select Window ? Preferences.

  2. Set the font size (General ? Appearance ? Colors and Fonts ? Basic ? Text Font):

    Enter image description here

  3. Save the preferences.


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.


Enter image description here

Menu Window ? Preferences. General ? Appearance ? Colors and Fonts ? Basic ? Text Font


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 Window ? Preferences. Drill down to: (General ? Appearance ? Colors and Fonts ? Basic ? Text 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.


For Eclipse Neon

To Increase Ctrl +

To reduce Ctrl -

shortcut for font eclipse


  1. On the menu bar, select Window ? Preferences
  2. Set the font size (General ? Appearance ? Colors and Fonts ? Structured Text Editors ? Structured Text Editor Text Font (set to default: Text Font) ? Edit...).
  3. Save the preferences.

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


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 Help ? Install 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

On the Eclipse toolbar, select Window ? Preferences, set the font size (General ? Appearance ? Colors and Fonts ? Basic ? Text Font).

Save the preferences.


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


Examples related to java

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How much should a function trust another function How to implement a simple scenario the OO way Two constructors How do I get some variable from another class in Java? this in equals method How to split a string in two and store it in a field How to do perspective fixing? String index out of range: 4 My eclipse won't open, i download the bundle pack it keeps saying error log

Examples related to eclipse

How do I get the command-line for an Eclipse run configuration? My eclipse won't open, i download the bundle pack it keeps saying error log strange error in my Animation Drawable How to uninstall Eclipse? How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Class has been compiled by a more recent version of the Java Environment Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory How to downgrade Java from 9 to 8 on a MACOS. Eclipse is not running with Java 9 "The POM for ... is missing, no dependency information available" even though it exists in Maven Repository The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. on deploying to tomcat

Examples related to fonts

How to import a new font into a project - Angular 5 Font Awesome 5 font-family issue How do I change the font color in an html table? How to add fonts to create-react-app based projects? Changing fonts in ggplot2 Webpack "OTS parsing error" loading fonts Failed to decode downloaded font Proper MIME type for .woff2 fonts Link a .css on another folder How can I fix the 'Missing Cross-Origin Resource Sharing (CORS) Response Header' webfont issue?

Examples related to font-size

Specifying Font and Size in HTML table How can I set the font-family & font-size inside of a div? How to change Bootstrap's global default font size? How to set min-font-size in CSS Is there such a thing as min-font-size and max-font-size? How can I change the font-size of a select option? Font scaling based on width of container Auto-fit TextView for Android Responsive font size in CSS increase font size of hyperlink text html