This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 405731 - [CSS] Part tab font not using system font
Summary: [CSS] Part tab font not using system font
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: 4.4 M5   Edit
Assignee: Dani Megert CLA
QA Contact: Daniel Rolka CLA
URL:
Whiteboard:
Keywords:
: 387253 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-04-15 10:23 EDT by Dani Megert CLA
Modified: 2014-01-20 06:10 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2013-04-15 10:23:55 EDT
4.x.

Like other elements, the part tab should honor my system fonts. Usually, this corresponds to the Dialog font. The Eclipse preferences show that my system font is correctly set as Eclipse's dialog font, but the tab font seems to be hard-coded to Segoe UI.

This is a major issue, because there is not other preference that would allow me to fix this issue and let Eclipse part tabs use the same font as every other tab my system.
Comment 1 Dani Megert CLA 2013-04-15 10:31:52 EDT
*** Bug 387253 has been marked as a duplicate of this bug. ***
Comment 2 Dani Megert CLA 2013-04-15 10:48:06 EDT
(In reply to comment #0)
> This is a major issue, because there is not other preference that would
> allow me to fix this issue and let Eclipse part tabs use the same font as
> every other tab my system.

There is a preference, but it does not work, see bug 355946.


I know that there is a CSS Editor and I can change the font there. That's fine if I really want to make Eclipse/product specific changes. Out of the box that font value should be set to my system's defaults. The 'Windows 7' theme could be generated on the fly from my system defaults or it could leave the system specific entries empty and fallback to the system defaults when missing.
Comment 3 Piotr Aniola CLA 2013-12-20 11:59:24 EST
Submitted https://git.eclipse.org/r/#/c/20124/ for review.
Actually the "fallback to the system defaults" feature was already there, but not working, due to CSSSWTFontHelper.getFontFamily adding double quotes around multi-word font names.
Comment 4 Daniel Rolka CLA 2014-01-15 11:58:23 EST
To use the ColorAndFontPreferencePage values you have to use the CSS bridge. Currently it is enabled for the Classic theme only (Bug 423704). In other cases the ColorAndFontPreferencePage settings will be overridden by CSS (font properties) or just ignored


Daniel
Comment 5 Dani Megert CLA 2014-01-15 12:03:56 EST
(In reply to Daniel Rolka from comment #4)
> To use the ColorAndFontPreferencePage values you have to use the CSS bridge.
> Currently it is enabled for the Classic theme only (Bug 423704). In other
> cases the ColorAndFontPreferencePage settings will be overridden by CSS
> (font properties) or just ignored

I'm not sure to what this comment refers, but I just want to repeat/clarify that this bug is about using the OS fonts out of the box, not making the preference page work again (which is bug 355946).
Comment 6 Piotr Aniola CLA 2014-01-17 08:38:15 EST
In addition to the previous commit: 
https://git.eclipse.org/r/#/c/20124/ 
which enables fallback to system default font, this new commit:
https://git.eclipse.org/r/20753
changes the CSSs so that the system font is used by default.

I made two commits because my understanding is that it is not possible to have one commit to two different projects.
Comment 7 Dani Megert CLA 2014-01-17 10:17:32 EST
(In reply to Piotr Aniola from comment #6)
> In addition to the previous commit: 
> https://git.eclipse.org/r/#/c/20124/ 
> which enables fallback to system default font

I don't think this change is needed. The quoting will be removed again later by the CSS engine (I think). At least for this bug the CSS change is enough to make the system font appear. However, instead of removing it entirely, it is better to use the new constant '#org-eclipse-ui-workbench-TAB_TEXT_FONT' like in other places. I've also removed the font-size.

Fixed with http://git.eclipse.org/c/platform/eclipse.platform.git/commit/?id=8cb3ea4bb672cdb2103766f887dc201ec3b69f6a
Comment 8 Piotr Aniola CLA 2014-01-20 05:58:47 EST
The quoting is added only for fonts with a '@' in front of the name or with spaces inside. Are you sure it works without my original change: https://git.eclipse.org/r/#/c/20124/ ?

As far as I could tell/test/debug, the quoting is not removed by the CSS engine.
Comment 9 Dani Megert CLA 2014-01-20 06:09:58 EST
(In reply to Piotr Aniola from comment #8)
> The quoting is added only for fonts with a '@' in front of the name or with
> spaces inside. Are you sure it works without my original change:
> https://git.eclipse.org/r/#/c/20124/ ?

Yes I am sure and you can simply verify it using I20140119-2000.
 

> As far as I could tell/test/debug, the quoting is not removed by the CSS
> engine.

OK. If you have a test case that surfaces a bug and which gets fixed by your change, please open a new bug report with those details.