GNOME Bugzilla – Bug 101753
default font should be system font
Last modified: 2007-01-02 17:44:44 UTC
Package: gedit Severity: normal Version: GNOME2.1.5 2.1.5 Synopsis: default font Bugzilla-Product: gedit Bugzilla-Component: general Description: by default gedit uses monospace/12 as the default font. I think that it would be better to "Use the default theme font" by default. ------- Bug moved to this database by unknown@bugzilla.gnome.org 2002-12-21 16:00 ------- Reassigning to the default owner of the component, maggi@athena.polito.it.
I really want to get this reviewed/committed before 2.2 so I'm going to post a patch. This is a major user-visible bug IMHO and very easy to fix. Monospace is a terminal font and looks hideous in a text editor and most users wont know how to fix it.
I do not agree, since normally text editors use a monospaced font as default font. CC-ing usability guys. What do you think?
Created attachment 13331 [details] Left: monospace/12 Right: theme font
From an accessibility point of view it's definitely better to use a theme-specified font by default. However, these days we have the added complication that the user can set up both an 'application' font (proportional) and a 'terminal' font (monospaced) in their desktop Font Preferences, so it's less clear what "use default theme font" means any more. I'm not sure I really have a good enough idea of what people really use gedit for to suggest which of the two makes a better default. I'm inclined to think that hackers (the main user of monospaced fonts in text editors) probably have emacs or gvim or whatever set up as their default text editor, though, so perhaps Mark is right. Maybe there's a case for a toolbar button that toggles between the default application font and the default terminal font? (Not sure exactly how this would interact with the ability to over-ride theme fonts with a user-defined font, though, would need to think about that).
I use gedit for hacking and as such I need a monospaced font. But I don't know what most people use gedit for.
FWIW, I mostly use it for wrinting LaTeX documents, editing CVS change log entries and printing tables with the results of the examinations of my students.
Created attachment 13340 [details] [review] sorry, never posted the patch
Calum: I think that it makes much more sense to use the application font than the terminal font and that is what gedit does currently when you select "Use default theme font". All: The way I see it hackers might need to use Monospace but the ordinary user will be more likely to want to use the default theme font. One of them is going to have to customise the program on first run and I think that it should be the hacker as they are likely to want to customise font settings anyway and are less likely to mind. I would be against having a toggle in the UI as this would just be confusing.
I really think that `Use default theme font' in gedit shouldn't point to the `Application font' (proportional). It should point to the `Terminal font' (monospaced) instead because a simple text editor (such as Notepad or gedit) is often used to edit short technical documents. Using the `Application font' in gedit would render the `Col.' feature completely useless; which is a bad idea. As opposed to a claim made in the above comment, even a non-technical user will *not* have to customize anything at all before a program's first run because the operating system vendor should take care of a sensible default `Terminal font'. As an example, Red Hat Linux 8.0 is already doing a good job with respect to this. This is definitely not GNOME's responsibility.
Note: This bug may become a non-issue when we got nice new bitstream fonts.
To all intents and purposes, we have them. But this bug isn't about installed fonts, it's about defaults.
For the moment can we at least make gedit use the system monospace font instead of setting it's own?
Good idea, Mark. Andrew was right, this isn't about fonts but defaults instead. Now that gedit uses gtksourceview (which means a lot of technical documents, such as source code), I would say it's pretty obvious that monospace is the best default choice.
So what should the option be? Maybe this: _ |*| Use Default System Monospace font And then the drop down for a custom font.
Yeah, sounds reasonable. We really need to write some boilerplate label wording into the HIG for 'use <x> from the theme', though, I'll try and do that Real Soon Now.
Perhaps it would be an idea to start by renaming the terminal-font option to fixedwidth font in gnome-font-properties? Since that is what we want to use it for, for example in: -terminal -plain text editors -email clients -viewing plain text in webbrowsers/nautilus/whatever
I have a vague recollection that we've had that discussion before, and that 'monospace' came out on top... but if you think it's worth revisiting, please open a bug against the Font capplet so we can keep this one for the gedit defaults issue (which is independent of whether we call the font 'monospace' or 'fixed width'). Incidentally, HIG 2.0 does now have that 'default way of choosing a font' section: http://developer.gnome.org/projects/gup/hig/2.0/windows-utility.html#preference-windows
Calum, I asume your comment is a reply to mine, monospace would be a fine name for the default monospace font setting in the Font capplet, but currently it it is still called Terminal font. Should I file a bug against the Font capplet for this? Now back to this bug, now that there are HIG guidelines for how to add a use system wide font pref option, could the checkbox please be changed to use the system wide monospace font as default and be checked by default?
Hans: yes, please go ahead and file a bug against the font capplet and we can discuss the pros and cons there.
This is still an issue in gedit today. gedit should by default use the monospaced system theme’s font, and then permit the user to change either to their own custom font for the application, or the system theme proportional font. It seems that this bug has been forgotten, and should probably be fixed. I know that I would use gedit more if it did this very basic thing—when I change the system font for monospace, it would be really nice if gedit would be able to inherit that setting. It isn’t that I have anything against emacs, but it would be nice to be able to use this since it is already integrated and doesn’t require me to open a terminal (I think that emacs in X is absolutely horrid looking, so I only use emacs in a terminal).
Why not use /desktop/gnome/interface/monospace_font_name ?
Yes, this one has been lingering for a long time :/ I seem to recall that Paolo Maggi and I had some disagreement about this, but I may be wrong... there are 2 things to consider here: 1 - the 'use theme font' checkbox in the preference should use the theme's monospaced font 2 - given (1), it should be made the default I think we should do (1) but I have doubts about (2) because the terminal font is too small to be a good default
I don’t think that it is too small, at least myself. I use the terminal font for everything that I want monospaced. If the user thinks that the font is too small, then the user should change it—that is why the options are there, and they aren’t that hard to find. If anything, a discussion of _what_ the default font for the system as a whole could be generated because the default monospace font doesn’t render well in the terminal while Courier New does, but that is off-topic here, really. I think that if anything, “use theme font” should reflect monospace. If I want a document that has pretty or “good looking” fonts, I can use AbiWord or OOo. I use a text editor for text, and that means nothing longer than 80 columns unless we’re talking about code, and in the case of code, it is obvious why it should be monospace. If anything, this is an annoyance, but it is still something that should be fixed. “Right,” in this case, should be determined by the functional use of the program, and in the case of gedit, I see no reason why the default font has to differ from the theme’s font. After all, that is why there are themes present, isn’t it—to make system-wide changes in fonts for applications?
I agree with michael traush. And I've always found gedit default font too big... 12 pt is really tall on a 1024 screen.
It would appear that the current state of gedit would actually be in violation of the Human Interface Guidelines for GNOME; can someone else confirm/deny that?
(In reply to comment #15) > Yeah, sounds reasonable. We really need to write some boilerplate > label wording into the HIG for 'use <x> from the theme', though, I'll > try and do that Real Soon Now. *cough* Bug 358962 has a roundup of possibilities. (In reply to comment #4) > From an accessibility point of view it's definitely better to use a > theme-specified font by default. However, these days we have the > added complication that the user can set up both an 'application' font > (proportional) and a 'terminal' font (monospaced) in their desktop > Font Preferences, so it's less clear what "use default theme font" > means any more. There is now also a 'Document font' in the Font preferences. Gedit appears to currently use the 'Application font', which as far as I can tell, is intended for menus/toolbars/dialogs, not documents.
I think we should modify the prefs dialog to be like the following one: | | [ ] Use the system fixed width font (Monospace 10) | | Editor Font: [ Monospace | 12 ] | The default will be the "use the system fixed width font". The good old gedit specific default will be used as suggested editor font in the case the user does not want to use the "system fixed width font". Do you all agree? Patches are welcome ;)
Sounds good to me, something maybe obvious, but: | Editor Font: [ Monospace | 12 ] Should of course be grayed out when: | [ ] Use the system fixed width font (Monospace 10) Is checked
Hans: sure, like in the current prefs dialog.
Gnome lovers: I'm sure you will be able to produce a patch for this bug. Ask on #gedit if you need some help. You can read the proposed solution in comment #27 (see also comment #28).
I'll try.
Can anyone help me to start? I must change the glade file... and which others?
Bruno: you have to change the glade file, the preferences dialog .c file and probably the prefs manager and the data/gedit.schemas.in file.
Created attachment 79188 [details] [review] patch This patch does what is suggested in comment 27.
Comment on attachment 79188 [details] [review] patch Here my comments: >+ <long>Whether to use the system's default monospaced font for editing >+ text instead of a font specific to gedit. If this option is turned s/monospaced/fixed width >+ label = g_strdup_printf(_("_Use the system fixed width font (%s)"), >+ editor_font); >+ <property name="label" translatable="yes">_Use the system fixed width font (%s)</property> You have the same string in two places. I suggest to use an empty string (with translatable="no") in the glade file. >+ <property name="urgency_hint">False</property> Why you added this? >+ gtk_source_view_set_tabs_width (GTK_SOURCE_VIEW (l->data), ts); >+ This could break the modelines plugin, but I think it is a fault of the modelines plugin itself. >+#define GPM_DEFAULT_SYSTEM_FONT (const gchar*) "Monospace 12" You define GPM_DEFAULT_SYSTEM_FONT as a constant, please verify it is equal to the default set in the actual GNOME schema. >+gchar *gedit_prefs_manager_get_system_font (void); >+void gedit_prefs_manager_set_system_font (const gchar *font); >+gboolean gedit_prefs_manager_system_font_can_set (void); We don't need set and can_set functions.
(In reply to comment #35) > >+ <property name="urgency_hint">False</property> > > Why you added this? Glade added it itself > >+ gtk_source_view_set_tabs_width (GTK_SOURCE_VIEW (l->data), ts); > > This could break the modelines plugin, but I think it is a fault of the > modelines plugin itself. IMHO we shouldn't need to call the set_tabs_width explicitely, but it's outside of the scope of this patch.
Created attachment 79192 [details] [review] patch v2
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.