After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 101753 - default font should be system font
default font should be system font
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: general
git master
Other other
: Normal minor
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2002-12-21 21:01 UTC by Mark Finlay
Modified: 2007-01-02 17:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Left: monospace/12 Right: theme font (105.90 KB, image/png)
2003-01-03 12:11 UTC, Mark Finlay
  Details
sorry, never posted the patch (479 bytes, patch)
2003-01-03 19:03 UTC, Mark Finlay
none Details | Review
patch (12.28 KB, patch)
2007-01-02 15:34 UTC, Steve Frécinaux
none Details | Review
patch v2 (14.55 KB, patch)
2007-01-02 16:55 UTC, Steve Frécinaux
committed Details | Review

Description Mark Finlay 2002-12-21 21:00:06 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.

Comment 1 Mark Finlay 2003-01-02 20:06:04 UTC
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.
Comment 2 Paolo Maggi 2003-01-02 22:37:59 UTC
I do not agree, since normally text editors use a monospaced font as
default font.

CC-ing usability guys.

What do you think?
Comment 3 Mark Finlay 2003-01-03 12:11:46 UTC
Created attachment 13331 [details]
Left: monospace/12 Right: theme font
Comment 4 Calum Benson 2003-01-03 13:09:19 UTC
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).
Comment 5 Andrew Sobala 2003-01-03 13:25:27 UTC
I use gedit for hacking and as such I need a monospaced font. But I
don't know what most people use gedit for.
Comment 6 Paolo Maggi 2003-01-03 14:42:18 UTC
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.
Comment 7 Mark Finlay 2003-01-03 19:03:36 UTC
Created attachment 13340 [details] [review]
sorry, never posted the patch
Comment 8 Mark Finlay 2003-01-03 19:10:08 UTC
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.
Comment 9 Evert Verhellen 2003-01-05 01:12:22 UTC
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.
Comment 10 Mark Finlay 2003-02-24 19:39:52 UTC
Note: This bug may become a non-issue when we got nice new
bitstream fonts.
Comment 11 Andrew Sobala 2003-02-24 19:59:11 UTC
To all intents and purposes, we have them. But this bug isn't about
installed fonts, it's about defaults.
Comment 12 Mark Finlay 2003-08-29 12:12:13 UTC
For the moment can we at least make gedit use the system monospace
font instead of setting it's own?
Comment 13 Evert Verhellen 2003-08-29 15:59:26 UTC
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.
Comment 14 Mark Finlay 2003-10-31 19:19:50 UTC
So what should the option be?
Maybe this:
  _
 |*| Use Default System Monospace font

And then the drop down for a custom font.
Comment 15 Calum Benson 2003-11-27 11:58:37 UTC
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.
Comment 16 Hans de Goede 2004-08-08 10:54:02 UTC
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
Comment 17 Calum Benson 2004-09-02 15:03:07 UTC
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
Comment 18 Hans de Goede 2004-09-02 19:56:21 UTC
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?
Comment 19 Calum Benson 2004-09-03 11:16:16 UTC
Hans: yes, please go ahead and file a bug against the font capplet and we can
discuss the pros and cons there.
Comment 20 Michael Trausch 2006-08-06 02:28:57 UTC
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).
Comment 21 jessevdk@gmail.com 2006-08-06 08:24:49 UTC
Why not use /desktop/gnome/interface/monospace_font_name ?
Comment 22 Paolo Borelli 2006-08-06 09:17:39 UTC
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
Comment 23 Michael Trausch 2006-08-06 09:37:20 UTC
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?
Comment 24 Steve Frécinaux 2006-08-06 16:20:36 UTC
I agree with michael traush. And I've always found gedit default font too big... 12 pt is really tall on a 1024 screen.
Comment 25 Michael Trausch 2006-08-25 20:54:03 UTC
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?
Comment 26 Joachim Noreiko 2006-11-02 11:20:34 UTC
(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.
Comment 27 Paolo Maggi 2006-11-04 10:52:14 UTC
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 ;)




Comment 28 Hans de Goede 2006-11-04 11:15:13 UTC
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
Comment 29 Paolo Maggi 2006-11-04 11:35:10 UTC
Hans: sure, like in the current prefs dialog.
Comment 30 Paolo Maggi 2006-11-04 11:37:41 UTC
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).
Comment 31 Bruno Boaventura 2006-11-04 12:07:21 UTC
I'll try.
Comment 32 Bruno Boaventura 2006-11-22 22:14:33 UTC
Can anyone help me to start? I must change the glade file... and which others?
Comment 33 Paolo Maggi 2006-11-23 08:46:16 UTC
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.
Comment 34 Steve Frécinaux 2007-01-02 15:34:45 UTC
Created attachment 79188 [details] [review]
patch

This patch does what is suggested in comment 27.
Comment 35 Paolo Maggi 2007-01-02 16:26:37 UTC
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.
Comment 36 Steve Frécinaux 2007-01-02 16:43:02 UTC
(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.
Comment 37 Steve Frécinaux 2007-01-02 16:55:12 UTC
Created attachment 79192 [details] [review]
patch v2
Comment 38 Steve Frécinaux 2007-01-02 17:44:44 UTC
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.