Bug 170450 - [mac] improve default task editor font
Summary: [mac] improve default task editor font
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All Mac OS X - Carbon (unsup.)
: P4 enhancement (vote)
Target Milestone: 2.0   Edit
Assignee: Dmitry Stadnik CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2007-01-15 05:41 EST by Dmitry Stadnik CLA
Modified: 2007-01-23 15:27 EST (History)
1 user (show)

See Also:


Attachments
task editor on mac (115.06 KB, image/png)
2007-01-22 07:59 EST, Dmitry Stadnik CLA
no flags Details
Now it's much better ))) (149.56 KB, image/png)
2007-01-22 14:34 EST, Dmitry Stadnik CLA
no flags Details
font override (1.09 KB, text/plain)
2007-01-23 07:25 EST, Dmitry Stadnik CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Stadnik CLA 2007-01-15 05:41:26 EST
Such as java editor does )))
That's more consistent and I should spend less time customizing workbench
Comment 1 Eugene Kuleshov CLA 2007-01-15 13:02:20 EST
-1. I think it should use dialog fonts like PDE editors.
Comment 2 Willian Mitsuda CLA 2007-01-15 13:12:49 EST
-1 too.

The problem is that text editor uses by default a monospaced font, which is good for code, but not for general text (at least on Eclipse workbench context).

My case is worse, because I use "Bitstream Vera Sans Mono" - 11, which looks very big. It looks very good for code, but on task editor it looks odd because you get into a mix of big fonts for comments and dialog fonts for the others.
Comment 3 Dmitry Stadnik CLA 2007-01-15 13:39:03 EST
It's OK to use dialog font that's used by other workbench editors - why define custom font???
Comment 4 Mik Kersten CLA 2007-01-21 21:47:02 EST
We had a fair amount of back-and-forth on this, and here is what was concluded:
* Deriving from text editor leads to a less readable editor for the reasons Willian mentions.  We used to have this as the default, and both the density and readability appear better when it is a dialog-based font, and more people seem to prefer it.
* Using the default dialog font ("org.eclipse.jface.dialogfont") is a problem because it is too small.  So we force the dialog font to be slightly larger on the typical setup by specifying "Tahoma-regular-10".

If anyone knows of a way to specify the equivalent of "org.eclipse.jface.dialogfont,size=+1" or even "org.eclipse.jface.dialogfont-10" (to avoid specifying Tahoma, which I think always falls back to something reasonable) that would be better, but I'm not sure this is possible.  Until we have a clear way to improve on this I'll close the bug

Dmitry: could you post a screenshot of what the default font looks like on a Mac?
Comment 5 Willian Mitsuda CLA 2007-01-22 02:40:14 EST
I remember that I suggested in some bug that it is possible to specify platform-specific overrides.

Dmitry, if you can suggest a good default for macos (and screenshot please), I believe Mik can set it out-of-box.
Comment 6 Dmitry Stadnik CLA 2007-01-22 07:59:46 EST
Created attachment 57248 [details]
task editor on mac
Comment 7 Mik Kersten CLA 2007-01-22 12:13:33 EST
Thanks for the screenshot Dmitry.  The fonts in that editor definitely do not look good enough.  What I want to happen by default is for every font visible in the editor to be the same typeface and size, and for the title/section fonts to be bold (as they currently are).  If you would like to provide a Mac-specific override please create a patch, and I would be happy to add it.  It seems like on the Mac, which has a large dialog font by default, a fine override may be simply the following.  However, this should be tested on a Mac.

  <fontDefinition
       ...
       id="org.eclipse.mylar.tasklist.ui.fonts.task.editor.comment"
       defaultsTo="org.eclipse.jface.dialogfont"/>

Also see:
* http://wiki.eclipse.org/index.php/Mylar_Contributor_Reference#Workspace
* http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_ui_fontDefinitions.html
Comment 8 Dmitry Stadnik CLA 2007-01-22 14:34:29 EST
Created attachment 57286 [details]
Now it's much better )))
Comment 9 Mik Kersten CLA 2007-01-22 20:26:54 EST
That looks way better.  Could you provide a patch to share this niceness with others?
Comment 10 Dmitry Stadnik CLA 2007-01-23 06:27:25 EST
Mik,

You've changed plugin.xml of org.eclipse.mylar.tasks.ui (1.186 -> 1.187) so it has font "org.eclipse.jface.dialogfont-10"; I think that Eclipse fails to recognize this and fallbacks to some default - dialogfont I guess )))

Comment 11 Dmitry Stadnik CLA 2007-01-23 07:25:59 EST
Created attachment 57335 [details]
font override

Here I set Tahoma10 on win32; other platforms use default font.
Comment 12 Dmitry Stadnik CLA 2007-01-23 07:39:30 EST
Actually Eclipse for Mac sets -Dorg.eclipse.swt.internal.carbon.smallFonts property in eclipse.ini by default so this adds another configuration dimension (((
Second screenshot shows default font in task editor without -Dorg.eclipse.swt.internal.carbon.smallFonts but default font looks good in both cases.
Comment 13 Willian Mitsuda CLA 2007-01-23 08:34:50 EST
Mik, Dmitry raised a interesting point, instead of making "Tahoma" the default and overriding to "dialogFont" on mac, wouldn't be better to make the "dialogFont" default and "Tahoma" a override on win32?

It is because I think "Tahoma" is a windows-only font.

It also would be interesting to know how a default of "dialogFont" appears to linux-gtk/motif (BTW, how does "Tahoma" appear on linux?).
Comment 14 Mik Kersten CLA 2007-01-23 15:27:45 EST
Patch applied, thanks Dmitry!  

Willian: yes, Dmitry's patch took the better approach of specifying the font for Windows only.  This means that we should still verify the default behavior on Linux, but no longer have to worry about how lack of Tahoma will fall back to another font.