Last Comment Bug 414427 - Should use "Document font" and "Fixed width font" families from gnome settings
: Should use "Document font" and "Fixed width font" families from gnome settings
Status: UNCONFIRMED
DUPEME?
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: x86 Linux
: -- enhancement with 1 vote (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-28 12:20 PST by Jakub 'Livio' Rusinek
Modified: 2008-12-06 13:41 PST (History)
14 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Jakub 'Livio' Rusinek 2008-01-28 12:20:46 PST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; pl; rv:1.9b3pre) Gecko/2008012804 Fedora/8 (Werewolf) Minefield/3.0b3pre
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; pl; rv:1.9b3pre) Gecko/2008012804 Fedora/8 (Werewolf) Minefield/3.0b3pre

to integrate better with linux environment firefox should respect fonts set by user in XSETTINGS protocol (at least the GNOME's settings).

Reproducible: Always

Steps to Reproduce:
1. open gnome's appearance settings
2. set some fancy fonts
3. open a website in firefox
Actual Results:  
user set fonts are not used (own settings are used)

Expected Results:  
maybe an option "use desktop environment fonts"?

we really need this to make our desktops pretty
Comment 1 Ian Spence 2008-01-28 17:19:01 PST
So what you are saying is that you want the option to have Firefox autodetect your "Document Font" and "Fixed Width Font" from your gnome settings, and use that as the default fonts for web content, instead of using the fonts set in the Font dialog which can be accessed via the Preferences dialog?

PS: What a cool runon sentence I made.
Comment 2 Jakub 'Livio' Rusinek 2008-01-28 21:44:34 PST
Yes, exactly that option, but DISABLED by default (distros can modify firefox.js easiliy).
Comment 3 Nicolas Mailhot 2008-01-29 00:41:14 PST
(In reply to comment #1)
> So what you are saying is that you want the option to have Firefox autodetect
> your "Document Font" and "Fixed Width Font" from your gnome settings, and use
> that as the default fonts for web content, instead of using the fonts set in
> the Font dialog which can be accessed via the Preferences dialog?

The full aim on *nix platforms would be to bypass completelety the historic Firefox font defaults and use the system font defaults, with the i18n substitution rules defined at fontconfig level. Distributions work hard to have settings in fontconfig that correspond to the fonts they actually deploy, Firefox is one of the last big visibility desktop app that ignores these settings.

Comment 4 Jakub 'Livio' Rusinek 2008-01-29 07:32:50 PST
Hmmm... interesting, but is it possible to do easily? Firefox doesn't use many thing directly...
Comment 5 Nicolas Mailhot 2008-01-29 07:41:40 PST
(In reply to comment #4)
> Hmmm... interesting, but is it possible to do easily?

It's basically the same thing you asked. Use XSettings to get default fonts, rely on fontconfig for substitution of those fonts, forget about the prefs.js font keys
Comment 6 Jakub 'Livio' Rusinek 2008-01-29 07:47:54 PST
Old users will not be satisfied... But I'll be as other own-font-settings-lovers :) .
Comment 7 Martin Sourada 2008-02-02 02:22:14 PST
I'd like to add, that while from the original bug report it might seem we aim only at the font family setting, we'd like firefox to make use of font size setting as well. The rationale behind is clear. Different users have different HW/SW setup and will have fonts (family and size) to fit their needs (e.g. user A with big monitor who sit far from it will have big fonts, say 16 pt, while user B with small monitor who sit close to it will have small fonts, say 9 pt) and together with correctly autodetected DPI the absolute font sizes will be more or less same for whatever resolution user chooses (and regardless the chosen screen resolution, user will see the same, only with less/more detail). 

And now you have firefox with font sizes set relatively to HW (in pixels) and not respective to system settings - this results in too small fonts for user A and too big fonts for user B (in case usual DPI around 100 is set) and differences between different screen resolutions on same monitor. At least in linux environment this is not an expected behaviour from any app.
Comment 8 David Baron :dbaron: ⌚️UTC+1 (mostly busy through August 4; review requests must explain patch) 2008-12-06 08:52:18 PST
Resummarizing bug to match the original request and moving to a possibly correct component (it's really split between the style system and gfx).  (If you want a bug about using gnome's font size as well, as comment 7 suggests, that should be filed as a *separate* bug report, although we're unlikely to do it.  Please avoid further discussion of that issue here.)

I'm also not sure how well this proposal would work across languages; there may be some language groups that really do prefer defaulting to serif rather than sans-serif, I think, but is GNOME's default always sans, and isn't language-group-specific?  (If it's locale-specific, that's even worse; I'd really prefer that English Web pages display the same by default on any locale system, and likewise for Japanese Web pages, etc.)

Given the amount of work involved (relative to the amount of benefit, which seems to me only questionably positive), this doesn't seem like a particularly high priority to me.
Comment 9 Felix Miata 2008-12-06 09:31:37 PST
(In reply to comment #8)
> If you want a bug about using gnome's font size as well, as comment 7 suggests,
> that should be filed as a *separate* bug report

That seems to have already been filed as bug 412669
Comment 10 Nicolas Mailhot 2008-12-06 09:45:08 PST
(In reply to comment #8)

> I'm also not sure how well this proposal would work across languages; there may
> be some language groups that really do prefer defaulting to serif rather than
> sans-serif, I think, but is GNOME's default always sans, and isn't
> language-group-specific?

The request is to hook in the current desktop settings exposed via XSettings to
apps. Those settings are already QAed for i18n, because you know, every well
behaved app installed uses them, so they better work. They correspond to fonts
actually installed on the system and to the user actual preferences. A user can
choose a serif default or even a specific font family if he so wishes.

There is *zero* value added in trying to bypass those settings by using
different lists.

> (If it's locale-specific, that's even worse; I'd
> really prefer that English Web pages display the same by default on any locale
> system, and likewise for Japanese Web pages, etc.)

It's not locale-specific.

> Given the amount of work involved (relative to the amount of benefit, which
> seems to me only questionably positive),

I think you do not understand the benefit.
The benefit for the user is Firefox just works like his other apps. As opposed
to Firefox behaving weirdly, trying to use different settings that other
applications, trying to use fonts not available on the system, and ignoring
fonts actually installed. The web is littered with Linux users asking why the
hell Firefox is misbehaving and using different fonts than other apps.

The user should not have to configure font settings in Firefox when his desktop
settings already work (either because the defaults were fine or because he
changed them to suit his tastes). Especially given the Firefox font defaults UI
is not exactly user-friendly.

The Linux situation is very different from the Windows situation where Firefox
can just use the proprietary Microsoft fonts. Linux font offerings are very
diverse and the default prefs.js Firefox settings are almost always wrong for
this platform.

> this doesn't seem like a particularly high priority to me.

It is sad to see that Mozilla developpers continue to have so little
understanding of free and open systems.
Comment 11 David Baron :dbaron: ⌚️UTC+1 (mostly busy through August 4; review requests must explain patch) 2008-12-06 09:52:53 PST
(In reply to comment #10)
> The Linux situation is very different from the Windows situation where Firefox
> can just use the proprietary Microsoft fonts. Linux font offerings are very
> diverse and the default prefs.js Firefox settings are almost always wrong for
> this platform.

Um, our default fonts on Linux are either 'serif' or 'sans-serif', which both map to fontconfig default sets.  So I don't see how the diversity is relevant here; we're already picking it up automatically.
Comment 12 David Baron :dbaron: ⌚️UTC+1 (mostly busy through August 4; review requests must explain patch) 2008-12-06 09:56:45 PST
Well, either 'serif' or 'sans-serif' for variable-width fonts (depending on language group); for fixed-width fonts it's 'monospace', of course.  See the default values of the font.name.* and font.default.* prefs in about:config.
Comment 13 Nicolas Mailhot 2008-12-06 10:04:09 PST
But that does not pick the user-level defaults exposed by XSettings.
Comment 14 David Baron :dbaron: ⌚️UTC+1 (mostly busy through August 4; review requests must explain patch) 2008-12-06 10:11:58 PST
I know that, but it refutes your point that fixing this bug would make Firefox use the diversity of fonts better.
Comment 15 Jakub 'Livio' Rusinek 2008-12-06 10:46:33 PST
I think it would be good, since it would affect only elements on webpage that have no font-family defined in CSS.
Comment 16 David Baron :dbaron: ⌚️UTC+1 (mostly busy through August 4; review requests must explain patch) 2008-12-06 10:57:13 PST
(In reply to comment #15)
> I think it would be good, since it would affect only elements on webpage that
> have no font-family defined in CSS.

That's not true; our font preferences define the user's preference for the CSS generic families 'serif' and 'sans-serif', and then choose which one is the default.  So if we have a different default font, that implies having a different value for either 'serif' or 'sans-serif', which means that either Web pages that specify:
  font-family: Helvetica, Arial, sans-serif;
or:
  font-family: "Times New Roman", Times, serif;
will display differently, assuming you don't have Helvetica, Arial, Times New Roman, and Times.
Comment 17 Jakub 'Livio' Rusinek 2008-12-06 11:00:12 PST
It was a "thought-shortcut", don't worry, I know about such situations. The problem is that default font set is different on all platforms, but SVG fonts and downloadable fonts (CSS3) will help it change in future.
Comment 18 David Baron :dbaron: ⌚️UTC+1 (mostly busy through August 4; review requests must explain patch) 2008-12-06 11:00:26 PST
And it also affects the case where the Web page specifies only fonts that aren't available, without a generic, like:
  font-family: Helvetica, Arial;
Comment 19 Masayuki Nakano [:masayuki] (Mozilla Japan) 2008-12-06 11:30:09 PST
(In reply to comment #17)
> It was a "thought-shortcut", don't worry, I know about such situations. The
> problem is that default font set is different on all platforms, but SVG fonts
> and downloadable fonts (CSS3) will help it change in future.

This is not true for Chinese and Japanese. The downloadable fonts are usable only in some languages which don't have many characters. If many web sites prepare the downloadable fonts for Chinese or Japanese characters, users need to download the large font files on each web sites. The file size is several MB at least.
Comment 20 Jakub 'Livio' Rusinek 2008-12-06 12:21:31 PST
Now I could say that this is your problem, but I understand that pain, when you can't use your language's own characters when writing a text.

But hey, doesn't China and Japan have fast Internet links? In Poland that could be a problem when we would use Japanese/Chinese characters, because most of our Internet links used by people isn't 1 Mbps, but you have 1 Mbps as minimum, probably, don't you?
Comment 21 Nicolas Mailhot 2008-12-06 12:45:03 PST
(In reply to comment #19)

> This is not true for Chinese and Japanese. The downloadable fonts are usable
> only in some languages which don't have many characters. If many web sites
> prepare the downloadable fonts for Chinese or Japanese characters, users need
> to download the large font files on each web sites. The file size is several MB
> at least.

BTW for this problem you should probably look at bug #467729 Not a transient font download, but actual long-term font installation.
Comment 22 Masayuki Nakano [:masayuki] (Mozilla Japan) 2008-12-06 13:07:20 PST
1 Mbps is not much faster for CJ fonts downloading. And such large link speed should not be used for fonts. Note that the downloadable fonts are not realistic by the cost too. E.g., there are few free Japanese fonts. Because the Chinese characters which are used in Japan are very many. (E.g., Joyo Kanji is about 2000 characters, see http://en.wikipedia.org/wiki/J%C5%8Dy%C5%8D_kanji ) Generally, one Japanese font which is for screen is about 10 thousand yen or more... Of course, such fonts cannot be uploaded for downloadable fonts. So, the free Japanese downloadable fonts are not realistic in future too.

I think that the current our font preferences are best solution for CSS rendering. The fonts of web contents are customizable by users and web designers. The gnome font setting didn't assume such customizable contents in applications, probably. So, maybe, we don't need to honor the settings in web contents.
Comment 23 Nicolas Mailhot 2008-12-06 13:41:09 PST
I'm quite sure Japanese users like others have no wish to have fonts working in Firefox but not other apps (or the reverse), so Firefox-level preferences which are different from desktop preferences just double their configuration burden for no win at all

Note You need to log in before you can comment on or make changes to this bug.