Last Comment Bug 95227 - Unable to set different default font type (serif vs sans serif) for different languages
: Unable to set different default font type (serif vs sans serif) for different...
Status: RESOLVED FIXED
: fonts, intl, relnote
Product: Core Graveyard
Classification: Graveyard
Component: GFX (show other bugs)
: Trunk
: All All
: P1 normal with 1 vote (vote)
: mozilla1.8beta1
Assigned To: Masayuki Nakano [:masayuki] (Mozilla Japan)
:
Mentors:
: 128208 128790 192347 275908 (view as bug list)
Depends on: 61883
Blocks: 244439 99227 149796 279533
  Show dependency treegraph
 
Reported: 2001-08-14 05:44 PDT by Shoshannah Forbes
Modified: 2009-01-22 10:17 PST (History)
32 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch rv0.3(work in progress) (39.28 KB, patch)
2004-12-24 20:12 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details | Diff | Splinter Review
a partly-representative example of different font choices (37.08 KB, image/png)
2004-12-25 06:01 PST, Eyal Rozenberg
no flags Details
10pt Arial vs 10pt Times New Roman (52.18 KB, image/png)
2004-12-25 08:24 PST, Eyal Rozenberg
no flags Details
Patch rv0.4(work in progress) (49.16 KB, patch)
2004-12-25 20:03 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details | Diff | Splinter Review
Patch rv1.0 (67.67 KB, patch)
2005-01-06 06:46 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details | Diff | Splinter Review
Patch rv1.0(layout/base) (1.08 KB, patch)
2005-01-06 06:50 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
dbaron: review+
dbaron: superreview+
Details | Diff | Splinter Review
Patch rv1.0(gfx/src) (21.62 KB, patch)
2005-01-06 06:52 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
masayuki: review-
Details | Diff | Splinter Review
Patch rv1.0(embedding/browser/photon/src) (1.79 KB, patch)
2005-01-06 06:56 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
amardare: review+
roc: superreview+
Details | Diff | Splinter Review
Patch rv1.0(extensions/tridentprofile/src, browser/components/migration/src) (2.87 KB, patch)
2005-01-06 07:02 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
danm.moz: review+
roc: superreview+
Details | Diff | Splinter Review
Patch rv1.0(prefwindow) (28.32 KB, patch)
2005-01-06 07:07 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
masayuki: review-
Details | Diff | Splinter Review
Patch rv1.0(all.js) (12.00 KB, patch)
2005-01-06 07:10 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
smontagu: review+
roc: superreview+
Details | Diff | Splinter Review
Patch rv1.1(gfx/src) (20.90 KB, patch)
2005-01-07 06:13 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details | Diff | Splinter Review
Patch rv1.1.1(gfx/src) (20.86 KB, patch)
2005-01-07 06:17 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details | Diff | Splinter Review
Patch rv1.1.2(gfx/src) (19.72 KB, patch)
2005-01-07 06:23 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details | Diff | Splinter Review
Patch rv1.1.2 -u8pw (gfx/src) (18.50 KB, patch)
2005-01-07 06:29 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details | Diff | Splinter Review
Patch rv1.1.3(gfx/src) (19.68 KB, patch)
2005-01-07 07:55 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
rbs: review-
Details | Diff | Splinter Review
Patch rv1.1.3 -u8pw (gfx/src) (18.47 KB, patch)
2005-01-07 07:56 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details | Diff | Splinter Review
Patch rv1.2(gfx/src) (13.71 KB, patch)
2005-01-08 04:03 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details | Diff | Splinter Review
Testcase of ISO-8859-1 (3.02 KB, text/html)
2005-01-08 04:05 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details
Testcase of Shift_JIS (3.02 KB, text/html)
2005-01-08 04:07 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details
Testcase of UTF-8 (3.02 KB, text/html)
2005-01-08 04:09 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details
Patch rv1.2 (59.79 KB, patch)
2005-01-08 04:28 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details | Diff | Splinter Review
Patch rv1.2.1(gfx/src) (13.73 KB, patch)
2005-01-09 08:05 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
rbs: review+
roc: superreview+
Details | Diff | Splinter Review
Patch 1.2.1 (59.81 KB, patch)
2005-01-09 08:07 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details | Diff | Splinter Review
Patch rv1.3(prefwindow) (34.65 KB, patch)
2005-01-10 20:27 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
neil: review+
roc: superreview+
Details | Diff | Splinter Review
Patch rv1.3 -u8pw (prefwindow) (31.37 KB, patch)
2005-01-10 20:28 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details | Diff | Splinter Review
Patch rv1.3 (66.15 KB, patch)
2005-01-10 20:36 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
no flags Details | Diff | Splinter Review
Patch rv1.4 (66.20 KB, patch)
2005-01-11 02:03 PST, Masayuki Nakano [:masayuki] (Mozilla Japan)
roc: review+
roc: superreview+
Details | Diff | Splinter Review

Description Shoshannah Forbes 2001-08-14 05:44:45 PDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
BuildID:    20010801

I just downloaded and installed Mozilla 0.93 on my w2k machine.
Unlike older builds, I can not set default font types (serif vs. sans-serif)
independently for each language (Hebrew and English). It only lets me set
both as serif or both as sans serif.

Going into the settings and changing them for one language, automatically
changes it for the other.

This is the setup I am trying to reach, but I am unable to:
Western languages: Default font should be Georgia (Serif)
Hebrew: Default font should be Arial (Sans-Serif)


Reproducible: Always
Steps to Reproduce:
1. Install Mozilla 0.93 on windows 2000 w/hebrew installed
2. Go into "prefrences", and change the default font type for latin as Serif
3. Set the default font type for Hebrew as sans serif

Actual Results:  both are set to the last type defined, regardless of the 
setting in each language

Expected Results:  Each lanauges should have indipendent default settings
Comment 1 Andreas Becker 2001-08-14 11:26:22 PDT
Switching qa contact to ylong. Yuying, please take a look at it and confirm. 
Comment 2 Yuying Long 2001-08-14 12:11:18 PDT
I checked 08-10 commercal trunk build on my Win2k-CN, I haven't seen this 
problem.

Reporter: your system is US win2k/w Hebrew installed?  have you ever found in 
some other OS?
Comment 3 Shoshannah Forbes 2001-08-15 00:02:31 PDT
Testing now on another machine running Hebrew enabled win98 2nd Edition, and
gthe bug is still there.
Mybe it is Hebrew spcific?
Comment 4 Andreas Becker 2001-08-15 17:38:36 PDT
CCing mahar@eg.ibm.com, giladehven@hotmail.com, and simon@softel.co.il
Comment 5 Simon Montagu :smontagu 2001-08-16 11:00:21 PDT
I see the same bug on WinNT with and without Hebrew support.
Comment 6 Andreas Becker 2001-08-16 18:20:04 PDT
Thanks for testing this. Changing status to NEW based on Simon's comment.
Comment 7 Frank Tang 2001-08-21 17:45:19 PDT
This could be caused by gerv@gerv.net 's check in . 
change the component to Preference, add gerv@gerv.net to the cc list and
reassign to default preference owner. 
Comment 8 sairuh (rarely reading bugmail) 2001-08-21 17:52:45 PDT
cc'ing gerv's current addy.
Comment 9 rbs 2001-08-24 00:12:01 PDT
Adding dependency to bug 61883.
The problem is that the back-end currently uses "font.default" as the pref key 
for the default font. (Note that the key doesn't include the langGroup.) 
Therefore, when switching from on langGroup to another, the previous selection 
is overwritten. See "Additional Comments From rbs@maths.uq.edu.au 2001-08-17 
18:05" on bug 61883 for details on the current keys, as well as the extension 
that will be happening soon. Feel free to provide feedback if any intl issue is 
not accounted for in the proposed extension.
Comment 10 Jaime Rodriguez, Jr. 2001-08-28 11:47:00 PDT
Ftang/Samir - Is this something we should fix for 0.9.4? Looks like a regression
we should address IMO. Pls advise .  . .
Comment 11 Jaime Rodriguez, Jr. 2001-08-28 11:56:24 PDT
Peter/Samir - If you agree that this is a regression and should be fixed this
round, pls mark as nsbranch+.
Comment 12 Gervase Markham [:gerv] 2001-08-28 12:00:51 PDT
rbs's patch, which I believe fixes this, is far too complex for 0.9.4. 

Did this ever work correctly? From what rbs says just above, it seems not.

Gerv
Comment 13 Shoshannah Forbes 2001-08-30 05:24:40 PDT
Strange, but it did work for me on older builds, like 0.90 / 0.91 
Comment 14 selmer (gone) 2001-09-17 14:04:01 PDT
I recommend nsbranch- for this bug.  Is this really a regression?
Comment 15 Gervase Markham [:gerv] 2001-09-17 14:15:04 PDT
The pref is font.default , and a quick look at lxr says it's been that way for
years. As far as I can see, there was never a way of setting this independently.

As I say, rbs' fix fixes this.

Setting nsbranch- based on selmer's comments.

Gerv
Comment 16 Peter Trudelle 2001-09-17 14:36:43 PDT
really setting nsbranch- (keyword)
Comment 17 Peter Trudelle 2001-09-18 16:46:18 PDT
over to rbs, per gerv's 2001-09-17 14:15 comments.
Comment 18 rbs 2001-09-18 18:37:01 PDT
To clarify, this bug won't be fixed _automatically_ after my checkin, bug 99010. 
To precisely match what the back-end expects, the front-end will have to be 
tweaked too... Specifically, the front-end will have to persist:

font.name.variable.[langGroup] = current user' selected font on the pref dialog

and, as explained in bug 61883, it will also have to sync the corresponding: 

font.default = generic type of current user' selected font
Comment 19 Jaime Rodriguez, Jr. 2002-02-06 10:42:37 PST
nominating ...
Comment 20 Prognathous 2002-05-07 08:54:58 PDT
Quote:
>This is the setup I am trying to reach, but I am unable to:
>Western languages: Default font should be Georgia (Serif)
>Hebrew: Default font should be Arial (Sans-Serif)

Same problem here (Mozilla v1.0/RC1 under Win2kPro)

Serif Hebrew fonts have a terrible (almost biblical) appearance.
Many first time users of Mozilla abandon it, just because of that. Most of them
don't even bother to check the font Preferences panel.

The default for Hebrew must be Sans-Serif.

Prog.
Comment 21 rbs 2002-05-07 13:30:32 PDT
Re-assigning to default component owner since I am not going to fix it.

My contribution was in the back-end which was checked in long ago (bug 99010),
at the same time as the back-end for the minimum font-size preference which was
only exposed recently (bug 110342). So, some UI savvy person needs to step in 
bug 61883 to move things forward as inspired by bug 110342. (I might help with
additional tweaks in the back-end if need arises during the fix of bug 61883.)

In the meantime, you can manually add this to your user.js:

user_pref("font.name.variable.x-western", "Georgia");
user_pref("font.name.variable.he", "Arial");
Comment 22 Samir Gehani 2002-05-07 15:07:38 PDT
Nav triage team: nsbeta1-
Comment 23 jg 2002-06-14 03:58:48 PDT
This seems similar/ the same as my bug
http://bugzilla.mozilla.org/show_bug.cgi?id=128790


another of my bugs that is related
http://bugzilla.mozilla.org/show_bug.cgi?id=128208

basically utg-8 japanese looks great, but iso-2022-jp looks **** in some serif
font. it would be nice to be able to get the japanese font
Comment 24 rbs 2002-06-14 15:33:35 PDT
*** Bug 128790 has been marked as a duplicate of this bug. ***
Comment 25 rbs 2002-06-14 16:14:26 PDT
*** Bug 128208 has been marked as a duplicate of this bug. ***
Comment 26 Ahmad A. Abu-Taha 2003-03-24 06:24:54 PST
Kindly be informed that Ahmad A. Abu-Taha (ahtaha@eg.ibm.com) from IBM Egypt is 
replacing Maha Abou El-Rous (mahar@eg.ibm.com) in monitoring and receiving 
notifications of Mozilla bugs regarding Arabic.
Comment 27 Shoshannah Forbes 2003-03-27 19:25:31 PST
*** Bug 192347 has been marked as a duplicate of this bug. ***
Comment 28 Justin Kerk 2004-08-27 17:33:04 PDT
I'm getting this with Firefox trying to set Japanese to sans-serif while keeping
everything else serif, although I can "cheat" by setting the Japanese "serif"
font choice to be the same as the sans-serif.

Is this bug generic enough to cover this or does a separate Firefox one need to
be opened?
Comment 29 Jungshik Shin 2004-10-16 22:12:13 PDT
(In reply to comment #21)

> In the meantime, you can manually add this to your user.js:
> 
> user_pref("font.name.variable.x-western", "Georgia");
> user_pref("font.name.variable.he", "Arial");

Does this still work?  It seems not. Anyway, I'd rather have
'font.default.LANG_GROUP' which can be set to serif, sans-serif, cursive and
fantastic, monospace (rather than any arbitrary font name). Implementing that
requires changes in all ports of Gfx. I'm changing the component to Gfx because
this doesn't require any change in 'layout/' but all the changes should happen
in 'gfx/' (and xpfe/toolkit)

Comment 30 rbs 2004-10-17 17:59:01 PDT
The prefs still work. Of course, you won't see them in action if you visit a
page that sets its fonts explicitly.

> Anyway, I'd rather have 'font.default.LANG_GROUP'

Comment bug 61883 comment 84 and bug 61883 comment 85 that draws from bug 28899.

See also point 2) in bug 61883 comment 87. 'font.default.LANG_GROUP' might be
good (as a separate holder) if it is not redundant with something else.
Comment 31 Shoshannah Forbes 2004-12-24 08:47:11 PST
*** Bug 275908 has been marked as a duplicate of this bug. ***
Comment 32 Masayuki Nakano [:masayuki] (Mozilla Japan) 2004-12-24 20:12:52 PST
Created attachment 169540 [details] [diff] [review]
Patch rv0.3(work in progress)
Comment 33 Jungshik Shin 2004-12-24 21:35:44 PST
(In reply to comment #32)
> Created an attachment (id=169540)
looks good. Please, change the default for Korean to 'sans-serif' as is done for
Japanese.


Comment 34 Mano (::mano, needinfo? for any questions; not reading general bugmail) 2004-12-25 00:20:59 PST
(In reply to comment #32)
> Created an attachment (id=169540) [edit]
> Patch rv0.3(work in progress)
> 

The default for Hebrew should be "sans-serif".

Thanks for working on this!
Comment 35 Eyal Rozenberg 2004-12-25 00:35:32 PST
(In reply to comment #34)
> The default for Hebrew should be "sans-serif".

I disagree. I believe the default for Hebrew should be serif; the problem is
that the current default serif font for Hebrew is a poor choice (it should be
David instead of Narkisim; at least on Windows).
Comment 36 Prognathous 2004-12-25 03:39:07 PST
The default for Hebrew should definitely be Sans-Serif. Serif is especially
unreadable in Hebrew, as was proved by a recent poll that span 42 users. In this
poll. Sans Serif won 95% of the votes. Only two users chose Serif (for spite?).

http://www.hwzone.co.il/community/index.php?topic=89493.0

As for David as a possible Serif font that does-not-suck, this was offered too:
http://www.hwzone.co.il/community/index.php?topic=89493.msg763583#msg763583

Nobody wanted to change their vote. In fact, in some font sizes, Narkisim is
even more legible than David, but the on-screen legibility of these fonts is so
poor compared to Sans Serif fonts such as Arial, that we're just wasting our
time debating this.

The default for Hebrew should definitely be Sans-Serif. Period.

Prog.
Comment 37 Eyal Rozenberg 2004-12-25 04:50:24 PST
Prog and Asaf, changing the default Hebrew font from serif to sans-serif is a
different issue than enabling different settings for different languages, so
please file this as a different bug (depending on this one) instead of having
this discussion/argument here.

(Plus I have a long answer to Prog's last comment but like I said I would rather
make it elsewhere).
Comment 38 Prognathous 2004-12-25 05:08:14 PST
Since the fix is going to change the defaults for Japanese and Korean, it is
perfectly ok to request a change for Hebrew as well. Let alone when the evidence
shows that this is what the public wants.

Eyal, your suggestion that David is in someway so superior to Narkisim fails the
test of reality. It's your own personal preference. As a Serif font, some users
actually prefer the latter.
-> http://forums.ort.org.il/scripts/showsm.asp?which_forum=117&mess=2140195

No matter how you look at it, public preference is not as overwhelmingly in
favor of one of those as it is in favor of Arial.

Now, I've shown solid evidence as to why the Hebrew proportional font should be
the same as Japanese and Korean and be set to Sans Serif, how about providing
some counter evidence?

Prog.
Comment 39 Eyal Rozenberg 2004-12-25 05:37:45 PST
Very well. Referring to the survey you linked to above:

- The sampling of opinions on such an issues using 10-20 votes from visitors of
HWzone.co.il is quite unsound statistically.
- Changing a survey after a while and counting 'change' votes introduces an
irreparable statistical bias to the already shaky basis of validity.
- The question was taken out of context in two ways. For the first way, consider
what would happen if I were to ask people whether large or small caps are more
legible. They would obviously tell me large caps are more legible - but they
wouldn't really want to read all text in large caps. To a great extent it is the
same case with serif vs. sans-serif fonts. Using serif font by default has a
certain awkwardness to it which is independent of the question of legibility,
and this is almost as true in Hebrew as it is in English (this is of course just
my opinion; but others may share this opinion as well) .
- The second way the question was taken out of context was by the surveyed not
having taken into consideration (nor having been asked to take into
consideration) the fact that almost all page authors who do not specify font
families for their pages assume the default is serif font.
- Worst of all, the survey question was rigged, in two ways. First, people were
asked to choose between two sections of text which _formally_ have the same font
size, but _actually_ do not. Taking the first line of text in both choices
(which contains the same sentence fragment, i.e. "hasdara" up to "ota"), is
613px x 7px in the Arial section, v.s. 586px x 6px in the Narkisim section (used
the non-bold version; not countied vertical extrusions above the line, e.g. the
upper edge of the lamed or the lower edge of the quf; I checked the sizes using
the first image put forward, not the later modifications of the question, which
also do not seem to change this situation). To emphasize this last point, the
Narkisim text was rendered in ~85% of the height of the Arial text.
- The second way the question was rigged was by comparing the fonts at a small
size, rather than the normal size of text. It is a known fact that serif fonts
become much less legible (relative to sans-serif ones) as the font size
decreases, since they include more minute details. That is why almost all web
pages which use smaller-size font also make it sans serif.
- An issue which does not constitute rigging but is still problematic is the use
in different desktop environemtns of different methods for anti-aliased font
rendering - there may be pros and cons to serif vs sans-serif which are
dependent upon the type of anti-aliasing (e.g. in Windows, try the two options
in Control Panel|Display|Appearance|Effects|Method to smooth edges of screen fonts).
- Finally, the survey was designed and carried out by someone with an interest
in a certain particular outcome, with no control or review of the methodology by
someone impartial or of the opposite opinion; this, regardless of the specific
faults mentioned above, already constitutes a statistical inference faux pas.

It is true that David instead of Narkisim is a personal preference of mine
rather than an objective claim. However I will say that I have never witnessed
anyone producing printed or on-line text (other than large-font 'artistic'
titles) in Narkisim, in my life. My preference is also partly due to the fact
that the variant of Narkisim for non-anti-aliased 12pt is not one of its best
(at least on Windows), while that of David is one of its best. But regardless of
which serif font is better, your argument that sans-serif is preferred to serif
is very far from being supported by 'solid evidence'.
Comment 40 Eyal Rozenberg 2004-12-25 06:01:36 PST
Created attachment 169558 [details]
a partly-representative example of different font choices

To illustrate my criticism above, I've attached a screenshot of the effect of
setting the font to Arial, Narkisim and David on my system. No nominal font
size changes have been made (i.e. the effective font heights and widths vary,
but 'formally' these are all 16px fonts).
Comment 41 Prognathous 2004-12-25 07:26:08 PST
Eyal, the anti-aliasing in your comparison doesn't work due to Bug 172430.
Regardless, I still find Arial to be significantly more legible, and I am
certain that if you bother to do a survey you won't get 95% support or even a
majority to either of the Serif fonts.

Now back to your previous comment,

- 42 votes is not a large group, but it is much more useful than what you've
provided us with so far - the opinion of a single individual.
- I didn't change the survey. I just asked for comments about an additional
sample (David vs. Narkisim and Arial). Only one participant had something to add
about the new sample, and it didn't involve David.
- Your opinion about Serif fonts being easier to read for long texts, is exactly
as you state, "just an opinion". I happen to think the opposite, but I preferred
to go to the length of actually checking what others prefer.
- Page authors who don't specify font type should not rely on browser settings.
Similarly, page authors who don't check for document.all should not assume the
browser supports it. Can you provide any hard evidence that such page authors
even *know* the difference between the various font families?
- The font size used in the test was 10pt. Switching to Narkisim 11 or to David
11, while keeping Arial at 10pt would not have normalized their sizes but would
have actually made the first two much larger. Choosing the same size for all
fonts was not only a "formal" choice, it was the also the best way to make their
sizes as close as possible. It's also what would happen if this bug is fixed.
- The reason to start by comparing small sized fonts was quite simple: I believe
that Mozilla should provide defaults that work fine for every page and for users
with different screen/resolutions. I don't see the point in choosing a font
that's only usable in optimal conditions.
- The scope of the survey and the resources invested in it could not cover all
operating systems, anti-aliasing methods, screen resolutions and so on. It is a
best effort that displays what many of us already knew - Sans Serif fonts are
much more legible for displaying on-screen Hebrew. If you think otherwise, I
suggest that you set up a similar survey. If you manage to provide a much larger
test group with all possible variants, then that would of course be more through
than my own survey. When can we see the results?

Prog.
Comment 42 Eyal Rozenberg 2004-12-25 08:24:16 PST
Created attachment 169561 [details]
10pt Arial vs 10pt Times New Roman

The anti-aliasing doesn't work because it shouldn't work. The default for
windows is no anti-aliasing and that's fine by me. There's no bug here. This is
the same thing I, and the vast majority of Windows users, see in notepad and
word and inernet explorer and everywhere.

Also, I don't need to provide anything. You're the one who's claiming that
Hebrew is somehow different than Latin with respect to serif vs sans-serif font
preference, that sans serif fonts are have excessively low legibility, and
asking for a change of the default. But if you believe that Mozilla should
provide defaults that work fine for every page and for users with different
screen/resolutions, then what you _really_ want is to change the default to
sans-serif for Latin as well as Hebrew: I've attached as illustration an image
similar to that in your survey, with the only difference being the use of Latin
script instead of Hebrew. Arial has there an obvious leigibility advantage at
10pt, which only increases when you go down to 8pt (again note the fact that
the font sizes aren't really the same; the Times New Roman is much smaller than
the Arial at 10pt).

For the same reason Mozilla's default font is not being changed from serif to
sans-serif for Latin script, so should the case be for Hebrew script. And if
you claim otherwise, you need to show that solid evidence.
Comment 43 Prognathous 2004-12-25 08:40:30 PST
(In reply to comment #42)
> The anti-aliasing doesn't work because it shouldn't work. 

Oh yes it should work, just like it does in IE. Read Bug 172430 and test it
yourself. I've attached a testcase that proves it.

> ...if you claim otherwise, you need to show that solid evidence.

I already have. Now it's up to the component owner to decide if this 42
participant survey is solid enough evidence, or if he wants to rely on the
subjective opinion of a single individual.

Prog.
Comment 44 Eyal Rozenberg 2004-12-25 09:06:26 PST
(In reply to comment #43)
> Oh yes it should work, just like it does in IE.

It does 'work'. The current behavior is how it works, just like in IE. (Prog.
conceded this just now in bug 172430).

> this 42 participant survey 

You can get 42 Million people, not just 42, to say that 7-pixel-high Arial is
more legible than 6-pixel-high Narkisim or David. And they would be telling the
truth, too - just like someone who tells you 10pt Arial is more legible than
10pt Times New Roman. So what?
Comment 45 Prognathous 2004-12-25 09:32:36 PST
The fact is, the survey compared size 10 fonts. It also compared size 12 fonts.
http://www.hwzone.co.il/community/index.php?topic=89493.msg764201#msg764201

Note that since these are two different fnot families, your can't really
normalize their size. For example, the letter 'tav' (ú) is taller in David 12
than it is in Arial 12, while the letter 'vav' (å) is the same height. The only
way to compare them is to select fonts that are "foramally" eqaully, which is
exactly what the survey did.

Bottom line: Whether the above stands for more than your singled opinion, is for
the component owner to decide.

Prog.
Comment 46 Prognathous 2004-12-25 09:35:02 PST
Sorry for the typos, here's the text, corrected:

The fact is, the survey compared size 10 fonts. It also compared size 12 fonts.
http://www.hwzone.co.il/community/index.php?topic=89493.msg764201#msg764201

Note that since these are two different font families, you can't really
normalize their size. For example, the letter 'tav' (ú) is taller in David 12
than it is in Arial 12, while the letter 'vav' (å) is the same height. The only
way to compare them is to select fonts that are "formally" eqaull, which is
exactly what the survey did.

Bottom line: Whether the above stands for more than your singled opinion, is for
the component owner to decide.

Prog.
Comment 47 Masayuki Nakano [:masayuki] (Mozilla Japan) 2004-12-25 20:03:26 PST
Created attachment 169576 [details] [diff] [review]
Patch rv0.4(work in progress)
Comment 48 Ernest Cline 2004-12-25 21:58:43 PST
While the argument about which default default should be used for Hebrew (serif
or sans-serif) has been intellectually interesting to read, which _initial_
defaults Mozilla ships with for Hebrew is irrelevant to this bug.  That
discussion belongs in bug 149796 for Hebrew in particular and bug 61883 in
general.  This bug is about allowing the user to decide for himself what he
wants his _personal_ defaults to be on a basis that doesn't have to be the same
for all scripts.
Comment 49 Hixie (not reading bugmail) 2004-12-26 07:50:41 PST
This should get review from rbs and roc before check-in.
Comment 50 Prognathous 2004-12-26 08:21:46 PST
(In reply to Ernest Cline, comment #48)
> which _initial_ defaults Mozilla ships with for Hebrew is irrelevant to this bug.

The patch sets Sans-Serif as the default for Japanese, Korean and Chinese. It's
completely relevant to ask the same for Hebrew.

> (In reply to Eyal Rozenberg, comment #44)
> You can get 42 Million people, not just 42, to say that 7-pixel-high Arial is
> more legible than 6-pixel-high Narkisim or David. 

I can't belive I actually fell for that. THEY WERE ALL 7-PIXEL-HIGH FONTS. You
forgot to count the serifs.

The fact that Serif fonts waste a single line of pixels to just display the
serifs makes them visibly smaller, while their total (raw) height is actually
the same as Arial's. This is another great reason to choose Sans-Serif as the
default for Hebrew.

Ian, before checking anything in, please at least consult with Simon Montagu.

Prog.
Comment 51 Eyal Rozenberg 2004-12-26 08:50:50 PST
(In reply to comment #48)

I agree with Ernet Cline. I do, however, believe that a review of the entire set
of font defaults for Hebrew (serifness, face, size) is indeed due. But after
this bug is fixed.
Comment 52 Hixie (not reading bugmail) 2004-12-26 09:09:18 PST
Um, I'm not checking anything in, I was just saying that this would need review
from roc and rbs before checkin. It goes without saying that this would need
smontagu's input too, since it's an i18n bug.
Comment 53 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-06 06:46:39 PST
Created attachment 170449 [details] [diff] [review]
Patch rv1.0
Comment 54 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-06 06:50:09 PST
Created attachment 170450 [details] [diff] [review]
Patch rv1.0(layout/base)
Comment 55 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-06 06:52:59 PST
Created attachment 170451 [details] [diff] [review]
Patch rv1.0(gfx/src)
Comment 56 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-06 06:56:09 PST
Created attachment 170452 [details] [diff] [review]
Patch rv1.0(embedding/browser/photon/src)
Comment 57 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-06 07:02:58 PST
Created attachment 170453 [details] [diff] [review]
Patch rv1.0(extensions/tridentprofile/src, browser/components/migration/src)
Comment 58 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-06 07:07:46 PST
Created attachment 170455 [details] [diff] [review]
Patch rv1.0(prefwindow)
Comment 59 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-06 07:10:59 PST
Created attachment 170458 [details] [diff] [review]
Patch rv1.0(all.js)
Comment 60 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-06 07:13:59 PST
I tested the patch rv1.0 on Windows only.
Comment 61 rbs 2005-01-06 13:59:36 PST
Comment on attachment 170451 [details] [diff] [review]
Patch rv1.0(gfx/src)

It is pointless to have the member variable "nsCOMPtr<nsIAtom>	 
mGenericLangGroup". The fonts are Init()'ed only once, and so mGenericLangGroup
is going to receive the value of mLangGroup and retain that all the rest of the
time. (It wouldn't even worth having that member either way.)

All you have to do is change "font.default" to 
"font.default." + langGroup, like you did in your patch for layout/base.
Comment 62 Mano (::mano, needinfo? for any questions; not reading general bugmail) 2005-01-06 14:27:09 PST
Comment on attachment 170451 [details] [diff] [review]
Patch rv1.0(gfx/src)

Where is the mac part?
Comment 63 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-06 19:34:56 PST
> Where is the mac part?

I cannot find the string "font.default" on Mac.
http://lxr.mozilla.org/seamonkey/search?string=%22font.default%22
Comment 64 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-06 20:24:59 PST
(In reply to comment #61)
> (From update of attachment 170451 [details] [diff] [review] [edit])
> It is pointless to have the member variable "nsCOMPtr<nsIAtom>	 
> mGenericLangGroup". The fonts are Init()'ed only once, and so mGenericLangGroup
> is going to receive the value of mLangGroup and retain that all the rest of the
> time. (It wouldn't even worth having that member either way.)

I don't think so. Init() is called some time.
If I change |if (mGeneric.IsEmpty() || mGenericLangGroup != mLangGroup)|
to |if (mGeneric.IsEmpty())|, the patch does not work fine on testcase.
http://bugzilla.mozilla.gr.jp/attachment.cgi?id=2514&action=view
Comment 65 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-06 20:28:27 PST
Comment on attachment 170451 [details] [diff] [review]
Patch rv1.0(gfx/src)

Please re-review for comment 64.
Comment 66 rbs 2005-01-06 21:26:36 PST
Init is called only once -- otherwise there would be leaks from objects that are
new()'ed in the Init() and not deleted until the font is destroyed. The several
Init() that you see are likely coming from different font metrics instances.

Try clearing mGeneric before calling "EnumerateFamilies", i.e.,

+ mGeneric.Truncate();
  mFont.EnumerateFamilies(FontEnumCallback, this);
Comment 67 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-07 06:13:43 PST
Created attachment 170548 [details] [diff] [review]
Patch rv1.1(gfx/src)
Comment 68 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-07 06:17:42 PST
Created attachment 170549 [details] [diff] [review]
Patch rv1.1.1(gfx/src)
Comment 69 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-07 06:23:58 PST
Created attachment 170550 [details] [diff] [review]
Patch rv1.1.2(gfx/src)
Comment 70 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-07 06:29:38 PST
Created attachment 170552 [details] [diff] [review]
Patch rv1.1.2 -u8pw (gfx/src)
Comment 71 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-07 06:35:32 PST
I removed |mGenericLangGroup| member and the code of copying generic font.
Because we can copy the generic font when mLangGroup of each instances must be
same value only.
Comment 72 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-07 07:23:21 PST
Oops...
I fogot camino. We must change the pref of camino.
http://lxr.mozilla.org/mozilla/source/camino/PreferencePanes/Appearance/Appearance.mm

But I cannot change it. Because it is not either C++ or Javascript.
I hope you make a patch.
Comment 73 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-07 07:55:39 PST
Created attachment 170560 [details] [diff] [review]
Patch rv1.1.3(gfx/src)
Comment 74 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-07 07:56:54 PST
Created attachment 170561 [details] [diff] [review]
Patch rv1.1.3 -u8pw (gfx/src)
Comment 75 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-07 08:09:36 PST
Changing priority and target milestone.
I hope this is fixed on Firefox1.1 and Mozilla 1.8.
Because this issue is important for marketing of Mozilla Japan.
Comment 76 rbs 2005-01-07 23:35:59 PST
Comment on attachment 170560 [details] [diff] [review]
Patch rv1.1.3(gfx/src)

This patch is incorrect.

I am going to explain a bit more what is happening. Suppose you have the
following elements:

1. <span style="font-family: Arial, serif">
   in this case, the font is fully specified, and mGeneric should
   have "serif".

2. <span style="font-family: Arial">
   in this case, the generic is missing, and mGeneric is inferred
   from font.default.[mLangGroup]

   -> therefore, if in your patch you forcibly treat case 1 as case 2,
      it is incorrect (which is why I am minusing the patch).

3. <span lang="en>
   you should check that the font ultimately used for this element is 
   font.name.[font.default.en].en
	     [actual mGeneric]

   In other words, there is subtle second level of indirection.
   Of course, "font.default.en" must have, say, sans-serif (= mGeneric)

4. <span lang="ja">
   check here that the font ultimately used for this element is 
   font.name.[font.default.ja].ja
	     [actual mGeneric]

   Here too, "font.default.ja" must have, say, serif (= mGeneric)

This is the behavior expected by design. If you are not seeing this
in your testcase, then something unexpected is going on.
Comment 77 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-08 04:03:12 PST
Created attachment 170652 [details] [diff] [review]
Patch rv1.2(gfx/src)

O.K.
I mistook for the role of mGeneric.
But this patch is _not_ influence of lang attribute.
But I think it is right for CSS inheriting system.
Therefore, the "font.default.[langGroup]" is influence of the document's
encoding.
See following testcases.
Comment 78 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-08 04:05:56 PST
Created attachment 170653 [details]
Testcase of ISO-8859-1
Comment 79 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-08 04:07:51 PST
Created attachment 170654 [details]
Testcase of Shift_JIS
Comment 80 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-08 04:09:17 PST
Created attachment 170655 [details]
Testcase of UTF-8
Comment 81 Benjamin Smedberg [:bsmedberg] 2005-01-08 04:11:09 PST
The generic font should depend on the language, not the encoding. If there is no
language specified, it is fine to guess the language from the repertoire being
used or from the encoding, but we should definitely not be using the encoding as
our only guide. What happens for universal encodings like utf8?
Comment 82 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-08 04:12:04 PST
On my system(Win2000-JA), Testcase of ISO-8859-1 is rendered with serif font.
And other testcases are rendered with sans-serif font.
Comment 83 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-08 04:28:02 PST
Created attachment 170656 [details] [diff] [review]
Patch rv1.2

For test.
Comment 84 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-08 07:00:44 PST
the screenshots of Testcase of ISO-8859-1 and Testcase of Shift_JIS are here.
http://bugzilla.mozilla.gr.jp/attachment.cgi?id=2545&action=view
http://bugzilla.mozilla.gr.jp/attachment.cgi?id=2546&action=view

I don't change Mac's source code, but it is fixed on mac too.
Comment 85 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-09 08:05:33 PST
Created attachment 170737 [details] [diff] [review]
Patch rv1.2.1(gfx/src)
Comment 86 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-09 08:07:18 PST
Created attachment 170738 [details] [diff] [review]
Patch 1.2.1
Comment 87 rbs 2005-01-09 19:21:09 PST
Comment on attachment 170737 [details] [diff] [review]
Patch rv1.2.1(gfx/src)

r=rbs, this is all what GFX needs.

The remaining problem that you mentioned comes from
nsPresContext::GetDefaultFont() in layout. It has to be updated to also take a
language as parameter (this will introduce a perf hit for the sake of
correctness). With its current signature, the Style System initializes sytle
contexts with the same font for the document-wide's language (as specified or
inferred), instead of the default font for the particular language of the
element. It matters significantly now because font.default has become
font.default.langGroup. Care to file another bug about this problem?
Comment 88 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-09 20:53:46 PST
I think that on style system, we should inherit font of all element that is not
spacified 'font-family'.
If we update the default font per different langGroup element, it is not this
system.

e.g.,
<p lang="ja">
  <span lang="en">english</span>
</p>

I think the span[lang=en] should inherit default font from p[lang=ja].
If it is not inherited, the computed style of span[lang=en] is 'serif' but the
parent element has the computed style is 'sans-serif'.
I think it is wrong.
Comment 89 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-09 21:00:58 PST
Comment on attachment 170455 [details] [diff] [review]
Patch rv1.0(prefwindow)

Ben:
Could you review it?
Comment 90 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-09 21:11:42 PST
Comment on attachment 170458 [details] [diff] [review]
Patch rv1.0(all.js)

Simon:

Could you review it?
I hope that you review that the each langGroup's default font are fit.
Comment 91 rbs 2005-01-09 21:58:19 PST
Re: comment 88
You are saying conflicting (or perhaps inarticulate) comments (one of which is a
wrong interpretation). Anyway, this bug is not a good place to discuss that.
Comment 92 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-10 06:13:26 PST
I tested follwing systems.
Win2000, GTK2+xft, GTK.

And in bugzilla-jp, tested on MacOS X by contributer.
Comment 93 neil@parkwaycc.co.uk 2005-01-10 06:43:29 PST
Comment on attachment 170455 [details] [diff] [review]
Patch rv1.0(prefwindow)

r=me if you fix these nits:

>-    var lists = ["selectLangs", "proportionalFont"];
>+    var lists = ["selectLangs"];
>     for( var i = 0; i < lists.length; i++ )
We now have a for loop that executes once... seems wasteful ;-) Just inline the
single value into the loop body.

>-    var lists = ["selectLangs", "proportionalFont"];
>+    var lists = ["selectLangs"];
>     var prefvalue;
>     
>     for( var i = 0; i < lists.length; i++ )
Same thing here.

>+            currDefaultFont = pref.getComplexValue( defaultFontPref, Components.interfaces.nsISupportsString ).data;
These should all use parent.hPrefWindow.getPref - don't bother changing the
existing ones, that's a separate bug, but use it for the new one (like you
correctly did for setPref).

>+        var defaultFontPref = "font.default." + languageList.value;
>+        var defaultFontVal = parent.hPrefWindow.pref.getComplexValue( defaultFontPref, Components.interfaces.nsISupportsString ).data;
>+        defaultFont.selectedItem = defaultFont.getElementsByAttribute( "value", defaultFontVal )[0];
This is also the wrong way; as well as using getPref the old selectedItem
technique is out of date. Correct code would be
defaultFont.value = parent.hPrefWindow.getPref("string", "font.default." +
languageList.value);
Comment 94 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-10 20:27:42 PST
Created attachment 170880 [details] [diff] [review]
Patch rv1.3(prefwindow)
Comment 95 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-10 20:28:37 PST
Created attachment 170881 [details] [diff] [review]
Patch rv1.3 -u8pw (prefwindow)
Comment 96 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-10 20:36:13 PST
Created attachment 170882 [details] [diff] [review]
Patch rv1.3
Comment 97 Simon Montagu :smontagu 2005-01-11 00:48:41 PST
Comment on attachment 170458 [details] [diff] [review]
Patch rv1.0(all.js)

>+pref("font.default.ar", "serif");

>+pref("font.default.he", "serif");

Please make .ar and .he default to sans-serif everywhere. I don't know what is
best for the Indic scripts, but we can always change the defaults in later
bugs.

r=smontagu with the changes to Arabic and Hebrew
Comment 98 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-11 02:03:38 PST
Created attachment 170906 [details] [diff] [review]
Patch rv1.4

all.js is updated.
Comment 99 neil@parkwaycc.co.uk 2005-01-11 05:56:17 PST
Comment on attachment 170880 [details] [diff] [review]
Patch rv1.3(prefwindow)

I've really opened a can of worms, haven't I ;-) Don't feel like you have to
fix these, after all, you're only reindenting. I also found a bug in the
existing code, you don't have to fix that either :-)

>+    if( !( "dataEls" in dataObject ) )
>+      dataObject.dataEls = [];
>+    dataObject.dataEls[ "selectLangs" ] = [];
Ideally I think these should use {} instead of []. Also, because "selectLangs"
is an identifier, you can use dataEls.selectLangs in place of
dataEls["selectLangs"] in several places, e.g.
dataObject.selectLangs = {};

>+        element.selectedItem = element.getElementsByAttribute( "value", aDataObject.dataEls[ "selectLangs" ].value )[0];
element.value = aDataObject.dataEls.selectLangs.value; should work.

>+            var prefvalue = parent.hPrefWindow.getPref( preftype, prefstring );
>+            element.selectedItem = element.getElementsByAttribute( "value", prefvalue )[0];
element.value = parent.hPrefWindow.getPref(preftype, prefstring); should work.
Comment 100 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-15 00:25:32 PST
this issue is important for marketing of Mozilla Japan.
Comment 101 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2005-01-23 13:49:02 PST
Comment on attachment 170906 [details] [diff] [review]
Patch rv1.4

r=everyone, sr=me
Comment 102 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2005-01-23 15:59:25 PST
I checked this in. Thanks for all the work!!!!!
Comment 103 Mano (::mano, needinfo? for any questions; not reading general bugmail) 2005-01-23 16:19:58 PST
Thanks Masayuki!

Note you should contact Ben Goodger (ben at mozilla org) for pref window
changes... He may override your changes in the new options dialog bug / branch
(see bug 274712).
Comment 104 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-01-23 19:52:55 PST
Thank you, everyone.

I separated new bug for prefernce dialog of camino.
That is bug 279533.
Comment 105 Eyal Rozenberg 2005-01-29 10:24:42 PST
(In reply to comment #97)
> Please make .ar and .he default to sans-serif everywhere. I don't know what is
> best for the Indic scripts, but we can always change the defaults in later
> bugs.

Why was this snuck in despite being the object of an argument? Simon, that
wasn't fair of you.
Comment 106 Simon Montagu :smontagu 2005-01-30 08:12:08 PST
(In reply to comment #105)
> Why was this snuck in despite being the object of an argument? Simon, that
> wasn't fair of you.

I personally also prefer serif (I will be changing the default in all my new
installations), and I take the statistics quoted here with a large grain of
salt. Even so, sans-serif seems to be what the majority of Hebrew-speaking users
want. We can't please all the people all the time.
Comment 107 Jungshik Shin 2005-02-24 16:05:11 PST
bug 283461 was filed to address the issue rbs raised in comment #87 and comment #91.

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