Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 56558

Summary: [Themes] [Fonts/Colors] Provide UI to set fonts for trees and tables
Product: [Eclipse Project] Platform Reporter: Andre Weinand <andre_weinand>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: aobuchow, beamso, boris, bsd, cmlenz, cocoakevin, daniel_megert, dave, david, dpeterson, dragonballs, eclipse.felipe, francisu, gheorghe, grant_gayed, jan.public, kirill.petrov, lally.singh, Lars.Vogel, michaelvanmeekeren, mistria, nicolai.kilian, ob1.eclipse, praveen_s, pyvesdev, rgrunber, skovatch, smw+eclipse, snorthov, stephan.herrmann, unqualified, vaccari
Version: 3.0Keywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 56476    
Attachments:
Description Flags
Eclipse Fullscreen on Powerbook
none
Eclipse Fullscreen on Powerbook (Linux GTK Version running through X)
none
Illustrative patch using styles - not meant to be applied none

Description Andre Weinand CLA 2004-03-29 07:51:46 EST
M8

Eclipse provides no UI to configure the font used in Tree and Tables but relies on a external mechanism 
of the underlying OS.
But the Macintosh provides no official UI to configure the font used in Tree and Tables.
(And even if such a UI would exist, it would not make sense to change this font globally just to get 
Eclipse's trees and tables right).

I suggest (for Mac OS X only) to add new font entries to the "Font and Color" preference page for all 
fonts that are used in Eclipse and are not configurable via Mac OS X.

These font entries could be most easily contributed via the org.eclipse.carbon.ui fragment.
Comment 1 Andre Weinand CLA 2004-03-29 07:53:56 EST
*** Bug 28739 has been marked as a duplicate of this bug. ***
Comment 2 Andre Weinand CLA 2004-03-29 07:55:35 EST
*** Bug 41221 has been marked as a duplicate of this bug. ***
Comment 3 Andre Weinand CLA 2004-03-29 07:57:24 EST
*** Bug 49453 has been marked as a duplicate of this bug. ***
Comment 4 Andre Weinand CLA 2004-03-29 08:05:47 EST
*** Bug 54586 has been marked as a duplicate of this bug. ***
Comment 5 Kim Horne CLA 2004-03-29 08:17:42 EST
XP doesn't provide this ability either so perhaps a general mechanism is needed
for all platforms.
Comment 6 Andre Weinand CLA 2004-03-29 08:46:52 EST
Very good, so then let's just add an entry for the root "System Font" in the font preference :-)
We would solve the biggest annoyance on Mac OS X in one swoop (and it would help on all other 
platforms as well).

(...and BTW, the default value for Mac would be "Lucida Grande Regular 11")
Comment 7 Andre Weinand CLA 2004-03-29 09:04:58 EST
*** Bug 34186 has been marked as a duplicate of this bug. ***
Comment 8 Andre Weinand CLA 2004-03-29 09:10:03 EST
*** Bug 38028 has been marked as a duplicate of this bug. ***
Comment 9 Michael Van Meekeren CLA 2004-04-01 11:31:13 EST
I'd like to suggest that it would be difficult for us to apply a new font 
consistantly to all trees and tables from the workbench at this point.  If the 
Mac default is so bad I would rather see us change this as the SWT level and 
for the Mac only.  

I know WinXP might not allow it to be changed but it does not see that bad as 
it is.
Comment 10 Andre Weinand CLA 2004-04-01 11:48:04 EST
Yes, I fully agree with comment #9!
The good thing is, Mac already has two System fonts: the standard big one, and a small one which is 
used for all applications that have to cram more UI into a constrained space (like IDEs).

Bug #28739 has a patch attached with the necessary changes for SWT.
Comment 11 Grant Gayed CLA 2004-04-01 12:04:48 EST
SSQ this has been identified as an important OS X item, please look into it for 
M9.  Note that comment 9 has the resolution and comment 10 has a link to an 
existing patch.
Comment 12 Steve Northover CLA 2004-05-05 11:13:30 EDT
Downgraded ... sorry about that but Eclipse doesn't think this is "stop ship".
Comment 13 Paul Cantrell CLA 2004-05-05 11:45:40 EDT
> Downgraded ... sorry about that but Eclipse doesn't think this is "stop ship".

Probably fair -- though I have a patched version of M7 with the problem fixed, and have actually 
*stopped accepting* new milestones, because this problem is obnoxious enough to outweigh all the  
progress since M7 for me!  Thus it has at least stopped this user's ship.  :)  So don't push it down 
too low.
Comment 14 Noah Vihinen CLA 2004-05-05 12:04:53 EDT
Yeah, as long as we're putting in our 2 cents, my ship has at least been slowed with this bug. The huge 
font taking up workspace on OSX is really starting to outweigh much of the benefit I get from using this 
IDE on the mac.
Comment 15 Steve Northover CLA 2004-05-06 12:12:30 EDT
Noah, can you attach a screen shot?  Thanks.
Comment 16 Noah Vihinen CLA 2004-05-10 08:48:17 EDT
Created attachment 10444 [details]
Eclipse Fullscreen on Powerbook
Comment 17 Noah Vihinen CLA 2004-05-10 08:57:29 EDT
I've attached a screen shot of Eclipse running on my powerbook.  The scale of the tree in Package 
Explorer gets to be difficult with larger projects that have lengthly package names.  It's even worse 
when you're looking at normal directory structures that have a depth of 4 directories or more.  Another 
place where I haven't been able to configure the font size is in the hover messages (see the String hover 
in the screen shot).  I've run the linux version of Eclipse through X on my Mac, and the scale of all the 
tree fonts are excellent.  I'll try to attach  another screen shots so you can compare tree scale in eclipse 
to other IDEs.
Comment 18 Noah Vihinen CLA 2004-05-10 09:33:04 EDT
Created attachment 10448 [details]
Eclipse Fullscreen on Powerbook (Linux GTK Version running through X)

When comparing the trees and hover comments to the previous attachment of the
mac version of eclipse, you can see that a lot more information is available
due to the correct font sizes.
Comment 19 Steve Northover CLA 2004-05-26 10:07:56 EDT
PMC have indicated that this is stop ship (wow).  Upgrading to P1.
Comment 20 Andre Weinand CLA 2004-05-26 10:33:34 EDT
What about this minimal fix:

We could apply the patch from bug #28739
and use the kSmallSystemFont only if a boolean System.property ("useSmallSystemFont") is true.
(Swing on Mac uses the same approach for things like, where the MenuBar appears).

For Eclipse we would define useSmallSystemFont=false in the Info.plist file. 
Users who want to use the small font could easily switch the property to true.

Other SWT applications would get the large system font as before.
Comment 21 Steve Northover CLA 2004-05-26 10:50:53 EDT
Yes, since the list of controls that should use small fonts is IDE specific, 
we are planning to add a property to set exactly those fonts that an IDE would 
like.  For example, fonts should be small in a tree or table but not small in 
a push button.  IDE's look like this but apps like the Finder do not.  
Therefore we can't change the defaults because we will break people who are 
trying to build apps that are not IDE's.

After 3.0, we will consider adding API that IDE's will need to use to choose 
exactly those fonts (and other properties) that an IDE on the Mac would like.  
At that point, we can get rid of the property (since it will NOT be API).

BTW:  Can anyone point me to the Apple documentation that supports what we are 
doing or are we just being the same as the Xcode?
Comment 22 Steve Northover CLA 2004-05-26 10:53:48 EDT
If it was just a matter of using small fonts everywere, we could add 
Display.setSmallFonts() API rather than specifying the property.
Comment 23 Silenio Quarti CLA 2004-05-26 18:36:42 EDT
As a temporary fix, you can define the system property "org.eclipse.swt.internal.carbon.smallFonts".

If this system property is defined when the display is created, all widgets will use the system small font.

Fixed in HEAD.
Comment 24 Andre Weinand CLA 2004-05-26 19:06:03 EDT
Works great, thanks!
Comment 25 Silenio Quarti CLA 2004-06-07 11:55:41 EDT
Lowering priority since there is a temporary fix in place.
Comment 26 Stefan Wasilewski CLA 2005-02-07 01:31:06 EST
I have the opposite problem on XP.  I use Eclpise on my work pc via Remote
Desktop Connection all the time, and my home machine has different resolution
and monitor size, making the fonts too small to read.  I can fix the editor
windows by simply changing the text font size, but there seems to be no way to
make the tree views bigger.
Comment 27 Kirill Petrov CLA 2008-04-08 14:38:36 EDT
Is there any development towards fixing this issue? The problem is very annoying on Mac OS X, since it does not provide controls for font sizes of the carbon applications (tinkertool can help with cocoa). In my case the problem is that the font is too small. Removing  option org.eclipse.swt.internal.carbon.smallFonts from the eclipse.ini file did not help me at all.
Comment 28 Matteo Vaccari CLA 2008-11-02 17:14:46 EST
I agree that it's very annoying and disappointing too.  Removing org.eclipse.swt.internal.carbon.smallFonts does increase fonts a bit, but I would expect this to be configurable.

Comment 29 nicolai.kilian CLA 2009-09-14 06:45:43 EDT
workaround doesn't work for me either (I am using Mac OS X 10.5.8)
Comment 30 nicolai.kilian CLA 2009-09-16 07:43:03 EDT
found workaround for Mac OS X 10.5.8:

- download and install TinkerTool and open it
- in TinkerTool, switch to "Fonts"
- next to "Help tags", click on "Change..."
- select a different font style / size, make sure TinkerTool has adopted the new setting
- close & restart Eclipse -> voilĂ !
Comment 31 praveen_s CLA 2009-12-11 12:24:28 EST
It would be really helpful if I can change fonts just for eclipse for things like package explorer as I need to use large fonts due to visual difficulties. I use really large fonts for text and it is stressful when I have to look for something in the package explorer or any window where I cannot change fonts. Visually impaired people would really appreciate any accessibility improvements.
Comment 32 Kevin Barnes CLA 2009-12-14 14:42:49 EST
The first step is to remove the -Dorg.eclipse.carbon.smallFonts line from your eclipse.ini (in Eclipse.app/Contents/MacOS).
If that's not sufficient, there isn't a lot of support from Apple for you (that I know of). You can play with the default scale factor by executing something like this in the terminal: 
         "defaults write org.eclipse.eclipse AppleDisplayScaleFactor 1.5"

The SWT Tree widget allows user to change fonts. If this bug is just to allow the package explorer font to be configurable, maybe we should move this bug to Platform-UI so that they can expose a new preference?
Comment 33 Oleg Besedin CLA 2009-12-14 15:18:18 EST
(In reply to comment #32)
> If this bug is just to allow the package explorer font to be configurable

Is it? See:

(In reply to comment #0)
> Eclipse provides no UI to configure the font used in Tree and Tables...
(In reply to comment #9)
> I'd like to suggest that it would be difficult for us to apply a new font 
> consistantly to all trees and tables from the workbench at this point...
Comment 34 Felipe Heidrich CLA 2009-12-15 15:47:51 EST
I have reread all the comments.

1) This bug is about making the fonts smaller not larger.
2) Eclipse sets -Dorg.eclipse.carbon.smallFonts, removing this arguments does increase the font size in eclipse (very noticeable on cocoa, not so much on carbon).
3) The only reason this bug is open is to provided a more friendly API than -Dorg.eclipse.carbon.smallFonts.

If removing -Dorg.eclipse.carbon.smallFonts is not good enough for you, try using the suggestions in comment 30 and comment 32. Thank you.
Comment 35 Matteo Vaccari CLA 2009-12-15 16:31:18 EST
(In reply to comment #34)
> I have reread all the comments.
> 
> 1) This bug is about making the fonts smaller not larger.
> 2) Eclipse sets -Dorg.eclipse.carbon.smallFonts, removing this arguments does
> increase the font size in eclipse (very noticeable on cocoa, not so much on
> carbon).
> 3) The only reason this bug is open is to provided a more friendly API than
> -Dorg.eclipse.carbon.smallFonts.
> 
> If removing -Dorg.eclipse.carbon.smallFonts is not good enough for you, try
> using the suggestions in comment 30 and comment 32. Thank you.

The bug is about making the font smaller OR larger.  There are valid reasons for wanting to change the font in either direction.  Removing the -D option in eclipse.ini does not give you nearly enough control.  The way I see it the change is tiny in both Carbon and Cocoa.

I think this is a serious usability issue.
Comment 36 Felipe Heidrich CLA 2009-12-16 10:39:53 EST
(In reply to comment #35)
> Removing the -D option in  eclipse.ini does not give you 
> nearly enough control.  

What about the suggestions in comment 30 and comment 32 ?

How would you solve this problem on Linux or Windows ?

do you have this problem on Finder (or other native mac app) ? How do you solve it there ?
Comment 37 praveen_s CLA 2009-12-17 00:07:28 EST
(In reply to comment #36)
> (In reply to comment #35)
> > Removing the -D option in  eclipse.ini does not give you 
> > nearly enough control.  
> 
> What about the suggestions in comment 30 and comment 32 ?
> 
> How would you solve this problem on Linux or Windows ?
> 
> do you have this problem on Finder (or other native mac app) ? How do you solve
> it there ?

(In reply to comment #36)
> (In reply to comment #35)
> > Removing the -D option in  eclipse.ini does not give you 
> > nearly enough control.  
> 
> What about the suggestions in comment 30 and comment 32 ?
> 
> How would you solve this problem on Linux or Windows ?
> 
> do you have this problem on Finder (or other native mac app) ? How do you solve
> it there ?
Yes, the workaround in 32 works. I am not sure if it is just me, but I see that the fonts are now not as crisp as they are. In other words, font size 10 magnified to 15 does not have the same crispness as font size 15. People with normal vision probably do not care much about font size, I didn't too until I had to use large fonts!. Now I use one font for the text and one font for the rest (dialog boxes, headers etc). Setting everything to large does not behave well in dialogs and other windows, they get chopped or not readable. So, for people like me, it is very helpful when we can control font sizes for different apps and for different contexts. 

There was a comment about the font in the finder. All I have to say is, I work with eclipse 8 hrs a day and cumulatively maybe 15-20 mins in a day using finder. So, what matters is what you use the most.
Comment 38 Matteo Vaccari CLA 2009-12-17 03:59:59 EST
(In reply to comment #36)
> (In reply to comment #35)
> > Removing the -D option in  eclipse.ini does not give you 
> > nearly enough control.  
> 
> What about the suggestions in comment 30 and comment 32 ?
> 
> How would you solve this problem on Linux or Windows ?
> 
> do you have this problem on Finder (or other native mac app) ? How do you solve
> it there ?

Most native Mac apps that work with text let you change font size easily.  It's true that the finder does not... but really, one of the strengths of Eclipse is the browsers in the Java Browsing perspective.  When you are demoing, or when you are pair programming, it's important to be able to read what is on the screen from a distance.  It's not just for people with eyesight problems.  

Once you make the effort to help people with disabilities, the effort pays off for everyone.  (Silly examples: build a ramp for people on wheelchairs, and it will be used by mothers with prams, people with trolleys, etc.)
Comment 39 Felipe Heidrich CLA 2009-12-17 10:48:13 EST
Oleg, only the UI team can fix this problem as request by the user, see comment 31.

This problem is worse on the Mac because it doesn't provide a good way to change the font for the desktop.
Comment 40 Oleg Besedin CLA 2009-12-17 13:43:56 EST
(In reply to comment #39)
> Oleg, only the UI team can fix this problem as request by the user, see comment
> 31.

The actual request is:

(In reply to comment #0)
> M8
> Eclipse provides no UI to configure the font used in Tree and Tables but relies on a external mechanism 
> of the underlying OS.

Changing just the package explorer won't help much as you'll have outline view, problems view, source control, and all other places still using the "regular" font. As the comment 9 and the comment 10 specified, this task needs a change in SWT to allow changing the "default" font used by trees and tables.

Or am I missing something and there is an SWT API to change the default font used by trees and tables? Then I'll be very happy to add a preference to expose it in the UI.
Comment 41 Felipe Heidrich CLA 2009-12-17 14:04:05 EST
No Oleg, you are not missing anything.

This API doesn't need to be in SWT. In UI, people use TableViewer and TreeViewer, you should be able to fix this in JFace.

That said, I don't think it is a good API. Right now Bogdan is working in the CSS engine for E4. That should offer a more elegant solution for this problem.
Comment 42 Oleg Besedin CLA 2010-01-04 13:25:42 EST
Created attachment 155257 [details]
Illustrative patch using styles - not meant to be applied

(In reply to comment #41)
> That said, I don't think it is a good API. Right now Bogdan is working in the
> CSS engine for E4. That should offer a more elegant solution for this problem.

That would be a very nice solution. Boris made some a mock-up code to see how we could use the functionality available in 3.6. The good news is that it works; the bad news is that it currently does not work consistently enough.

(I am attaching an illustrative patch that shows how this could be done in 3.6; the patch, of course, is not meant to be applied as is.)

So, should we mark this as an enhancement request for Eclipse 4.0 / CSS Styling?
Comment 43 Scott Kovatch CLA 2010-06-07 16:31:40 EDT
I think we are agreed it's not an SWT issue, so I'm going to move this out of the SWT inbox.
Comment 44 Lally Singh CLA 2010-06-08 10:12:53 EDT
I'd like to point out that this bug was entered over 6 years ago, and was only ever a request to have a font selection control.  Not exactly an NP problem.
Comment 45 David Shepherdson CLA 2010-06-10 21:25:51 EDT
The approach suggested in comment #30 doesn't work properly for me in Mac OS X 10.6.3 with Eclipse 3.5.1 (Cocoa). NSToolTipsFontSize successfully alters the size of the various lists in the Eclipse UI, but NSToolTipsFont doesn't seem to make any difference (though it does change the font used for tooltips in other applications).

I think this means that if all you want to change is the size, then you're fine, but if you want to alter the font itself, there's no current way to do it.
Comment 46 DONG Keren CLA 2011-01-31 11:03:43 EST
(In reply to comment #44)
> I'd like to point out that this bug was entered over 6 years ago, and was only
> ever a request to have a font selection control.  Not exactly an NP problem.

Can not agree more. Years ago it was said to be problem of carbon API, now with cocoa based SWT it has still not been fixed! So frustrating. Don't know why is it so difficult to provide just a font configuration, at least Intellij IDEA can be easily configured with an override system font.
Comment 47 Stephan Herrmann CLA 2014-10-19 13:49:04 EDT
With all the work in themeability, wouldn't this be one of the first things to address in a platform independent way?

My use-case: on a laptop I need easy switching between small fonts (for dev work) and bigger fonts (for demos). No, switching screen resolutions is not a good option for this (on my laptop).

Someone could even earn a 5-digit-bug-fixed badge with this :)
Comment 48 Stephan Herrmann CLA 2018-03-04 08:09:54 EST
Why does the discussion in this bug focus so much on MacOS? IMHO, fonts in trees and tables should be configurable on all platforms.

I'm on Linux and my issue is more about increasing font size for demos, but wouldn't a global setting for this make all users happy?

Is this blocked by technical difficulties in underlying API, or by questions of technical design withing Eclipse?
Comment 49 Lars Vogel CLA 2018-11-15 05:57:23 EST
I suggest to provide an entry to the Color and Font preference for Table and Tree. Individual tree implementation or table implementation could use this preference to configure them. If we agree of following this approach, I would use this bug to add the preference and we should open additional bugs for the individual UI components to use them.


@Roland, IIRC you worked most on styling issues via Color and Fonts. What do you think of the idea?


@Stephan, the CSS engine  can already style the table and trees, e.g.,

Tree {
	font-size: 40px;
}
 
make all trees really big.
Comment 50 Pierre-Yves Bigourdan CLA 2020-08-10 13:24:09 EDT
Andrew, did you not effectively solve this one in another bug? :)
Comment 51 Andrew Obuchowicz CLA 2020-08-10 19:50:56 EDT
(In reply to Pierre-Yves B. from comment #50)
> Andrew, did you not effectively solve this one in another bug? :)

Yes, from what it seems this was fixed in bug 540299 !

*** This bug has been marked as a duplicate of bug 540299 ***