How to Change Font Size in Eclipse for Java Text Editors

How can I change font size in Eclipse for ALL text editors?

This is what we figured out, and this is also found in this answer and also this answer (I'll quote):

Go to PreferencesGeneralAppearanceColors and Fonts, expand the "Basic" folder and select "Text Font" and change that to whatever size you like.

Pretty simple!

Here's what the dialog looks like -- click Edit

How do I change the default text font in Eclipse?

Software Salariman has posted a solution - "Change Default Text Font in Eclipse".

The default font is set in:

Menu WindowPreferencesGeneralAppearanceColors and fontsBasic/Text Font.

how can i change the font size of a text file in Eclipse

@Ian
(Posting as answer)

Follow this

select General → Appearance → Colors and Fonts → Basic → Text Font.

How to change font (size) for an Eclipse editor programmatically?

You specify the 'symbolic font name' to use in the org.eclipse.ui.editors extension point declaration of your editor using the 'symbolicFontName' attribute.

For example, this is the Java editor:

<extension
id="javaeditor"
point="org.eclipse.ui.editors">
<editor
name="%CompilationUnitEditorName"
default="true"
icon="$nl$/icons/full/obj16/jcu_obj.png"
contributorClass="org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditorActionContributor"
class="org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor"
symbolicFontName="org.eclipse.jdt.ui.editors.textfont"
id="org.eclipse.jdt.ui.CompilationUnitEditor">
<contentTypeBinding
contentTypeId="org.eclipse.jdt.core.javaSource"
/>
</editor>

Which is defining the symbolic font name to use as org.eclipse.jdt.ui.editors.textfont.

The symbolic font name is a reference to a font definition in the org.eclipse.ui.themes extension point.

For example the org.eclipse.jdt.ui.editors.textfont is defined as:

<extension
point="org.eclipse.ui.themes">
<fontDefinition
label="%javaEditorFontDefiniton.label"
defaultsTo="org.eclipse.jface.textfont"
categoryId="org.eclipse.jdt.ui.presentation"
id="org.eclipse.jdt.ui.editors.textfont">
<description>
%javaEditorFontDefintion.description
</description>
</fontDefinition>

This definition sets the font to default to be the same as the standard Text Font.

Fonts defined this way will appear in the Eclipse Preferences in 'General > Appearance > Colors and Fonts'

Eclipse text is way to big

The issue seems to be caused by eclipse always taking the monitor "scale" value of the main display regardless of what monitor it is on. This post offers a workaround



Related Topics



Leave a reply



Submit