Bug 474989 - Eclipse fails to apply saved text editor font choices
Summary: Eclipse fails to apply saved text editor font choices
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.5   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2015-08-14 10:24 EDT by Andre Veltstra CLA
Modified: 2020-04-16 03:19 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andre Veltstra CLA 2015-08-14 10:24:46 EDT
Similar to but different from bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=83561 which is still open after 10 years.

After setting a global default text editor font choice, Eclipse manages to remember this choice, applies it to the current project text editor (unless specifically overridden), and saves it to my personal settings.

This is great. 

After shutting down Eclipse and opening it up again, Eclipse still knows which font I chose.

But all text editors are shown in the default system font, which is not set anywhere in any setting. 

Then I have to reapply my choice, only to recognise Eclipse doesn't apply it outright. First I have to select a different font, and then switch back to my preferred font. 

Every. Single. Time.

Quite the annoying user experience. Please fix.
Comment 1 Dani Megert CLA 2015-08-14 11:17:42 EDT
This works for me.

1. download latest release Mars (4.5):
http://download.eclipse.org/eclipse/downloads/drops4/R-4.5-201506032000/
2. start new workspace
3. create a project and a file works.txt with some text
4. change the 'Text Font' on the 'Colors and Fonts' preference page to Courier Bold 15
==> editor changes to chosen font
5. exit
6. File > Restart
==> editor still uses chosen font
Comment 2 Dani Megert CLA 2015-08-14 11:19:00 EDT
Maybe you see this in a special editor that's not ours?
Comment 3 Andre Veltstra CLA 2015-08-14 11:35:29 EDT
Thank you for executing your test and sharing your results.

I am using Mars 4.5 too, and before that I used Luna, and neither were capable of reapplying the selected font to a Java editor. 

The font choice does not seem to matter. I have tried Courier, Lucida Console, and Consolas. Eclipse always reverts to Microsoft Sans.
Comment 4 Andre Veltstra CLA 2015-08-14 11:36:19 EDT
As far as I know I'm using the regular Java editors supplied with Eclipse.
Comment 5 Dani Megert CLA 2015-08-14 11:38:44 EDT
(In reply to Andre Veltstra from comment #4)
> As far as I know I'm using the regular Java editors supplied with Eclipse.

There is a separate font preference for the Java editor. If you've set that, then of course changing the 'Text Font' has no effect.


> Thank you for executing your test and sharing your results.

Can you confirm that this works?
Comment 6 Andre Veltstra CLA 2015-08-14 12:00:43 EDT
I ran your test and can confirm that it worked. Thank you.

However, that did not solve the problem for the Java editors. 

No, I did not specify project-specific font settings. 

I found something else though. Maybe that will help:

Eclipse's preferences > General > Appearance > Colors and Fonts has a separate section for the Java text editor. That has a Java Editor Text Font setting which overrides the Basic Text Font setting. 

This Java Editor Text Font refuses to stay reset to the Basic Text Font. I can reset it and it will work for the current session, but after an Eclipse restart it's back to overriding the Basic Text Font, imposing Microsoft Sans at 8pt.

I will test what happens if I set that setting to a specific font.
Comment 7 Andre Veltstra CLA 2015-08-14 12:04:55 EDT
(In reply to Andre Veltstra from comment #6)
 
> I will test what happens if I set that setting to a specific font.

Success: setting the Java Text Editor Font to a specific choice is reapplied after restarting Eclipse. 

This is counter-intuitive:
1. Resetting this to inherit the Basic Text Font did not persist beyond the current session and got reverted after restarting. 
2. Setting the Basic Text Font applies to Java editors even though the Java Text Editor Font was set to override it. 
3. The Java Text Editor Font should not be set to override the Basic Text Font by default. By default it should inherit the Basic Font.
Comment 8 Dani Megert CLA 2015-08-14 12:10:04 EDT
(In reply to Andre Veltstra from comment #6)
> No, I did not specify project-specific font settings. 

Nothing like that exists.


(In reply to Andre Veltstra from comment #7)
> (In reply to Andre Veltstra from comment #6)
>  
> > I will test what happens if I set that setting to a specific font.
> 
> Success: setting the Java Text Editor Font to a specific choice is reapplied
> after restarting Eclipse. 
> 
> This is counter-intuitive:
> 1. Resetting this to inherit the Basic Text Font did not persist beyond the
> current session and got reverted after restarting. 

Please provide detailed steps starting after step 3 in comment 1. I cannot reproduce this.


> 2. Setting the Basic Text Font applies to Java editors even though the Java
> Text Editor Font was set to override it. 

This not the case for me. Please provide detailed steps starting after step 3 in comment 1.


> 3. The Java Text Editor Font should not be set to override the 
Basic Text Font by default. By default it should inherit the Basic Font.

That's what happens for me out of the box. Changing the 'Text Font' applies to the Java editor as well.
Comment 9 Eclipse Genie CLA 2020-04-16 03:19:23 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.