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?
Go to Preferences > General > Appearance > Colors and Fonts, expand the "Basic" folder and select "Text Font" and change that to whatever size you like. Show activity on this post. Restart Eclipse to apply changes.
You can set which Eclipse editor or external program to use to open a specific type of file based on its file extension. Just select Window→ Preferences→ Workbench→ File Associations, select the file type, and associate an editor or program with it (if nothing else, you can use Eclipse's default text editor).
You can't actually change the size of an existing Font object. The best way to achieve a similar effect is to use the deriveFont(size) method to create a new almost identical Font that is a different size. Note: you need to specify that bigNumber is a float, otherwise you'll trigger the deriveFont(int style) overload.
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.
Check that you do not have per-project preferences. These will override the top-level preferences.
Per comment below, this has moved to the Eclipse Preferences menu (no longer named the Window menu).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With