Closed Bug 299222 Opened 19 years ago Closed 17 years ago

Mac font defaults for "new" langGroups (Indic + Armenian, Georgian, Ethiopic, Can. Syllabics)

Categories

(Core :: Internationalization, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9beta1

People

(Reporter: alqahira, Assigned: alqahira)

References

Details

Attachments

(2 files, 5 obsolete files)

Bug 237434 added a bunch of new langGroups to the trunk and set default fonts for Windows. This bug is to set what defaults we can set for Mac OS X. This bug is partly dependent on bug 246527, because the Mac OS X fonts for Indic scripts and for Armenian aren't recognized by Gecko. (Possibly other bugs come into play, too.) Unfortunately, the work-around we currently use for Arabic, Hebrew, Thai, and Greek (define Lucida Grande and Monaco as defaults and let font-fallback(?) display characters in the proper font) does not work for these fonts; the user still sees ????. Mac OS X does not ship with fonts that cover Bengali, Khmer, and Malayam, nor Ethiopic and Georgian. With freely-available fonts like TITUS Cyberbit Basic and FreeSerif (from the Free UCS Fonts project, <http://savannah.nongnu.org/download/freefont/>, we can display Ethiopic and Georgian (and Armenian now falls back to these and gets displayed). Both the Mac fonts for zh-HK and many of the Windows fonts for these new langGroups set a freeware or shareware font as the default, so this seems like a reasonable solution for Ethiopic, Georgian and, via font-fallback, Armenian. FreeSerif and FreeSans also contain characters for Devanagari, Bengali, Gurmukhi, and Tamil; FreeSans contains characters for Gujarati. TITUS Cyberbit also covers Devanagari. I don't know how complete the coverage of these fonts are (they seem reasonably complete, except Tamil, based on when I see ? in wikipedia browsing). However, AFAIK, to handle complex layout on the Mac, the fonts must be AAT fonts (like with Arabic script), so even if the characters are displayed with these fonts installed, they will be in the wrong order (at least that's what I see comparing Devanagari pages in Fx/Cm and Safari). Indic scripts are really beyond my expertise, so corrections welcome :-) If AAT fonts are not required, or if some of the Indic langauges/scripts don't have glyph reordering, the aforementioned free fonts, plus potentially others, could be available. In summary, we can add 1) Canadian Syllabics with no problems at all (well, the text is rendered poorly, but it's there) 2) Georgian and Ethiopic with freely-available fonts 3) Armenian, by font-fallback, with above fonts Gfx:Mac (bug 246527) plus potentially other problems need fixing for 4) Devanagari, Gujarati, Gurmukhi, Tamil (someone with 10.4 should verify Tamil) No known AAT fonts for 5) Bengali, Khmer, Malayam I will attach a brief testcase and an "if Gfx:Mac weren't broken" defaults patch, but I expect a final patch will require discussion. I'm cc'ing smfr because of Camino bug 292416, jshin and mano because of their knowledge and past help in these areas, and josh becaue he owns bug 246527; apologies if that's improper (and for the long-winded report).
Attached patch updated to tip (obsolete) — Splinter Review
We can do this on the trunk now thanks to Cairo :) and it would be good to set some defaults finally! jshin, are you the right person to r this?
Assignee: smontagu → alqahira
Attachment #187764 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #249906 - Flags: review?
Comment on attachment 249906 [details] [diff] [review] updated to tip Apparently jshin is a non-unique name fragment :/
Attachment #249906 - Flags: review? → review?(jshin1987)
Comment on attachment 249906 [details] [diff] [review] updated to tip Thanks for taking this up. I tested Tamil (of which you're not sure) on Mac OS 10.4.8 and it seems to work (I just had a cursory look and need to take another look to make sure the reordering and shaping actually work.) >+pref("font.name.serif.x-devanagari", "Devanagari MT"); >+pref("font.name.sans-serif.x-devanagari", "Devanagari MT"); >+pref("font.name.monospace.x-devanagari", "Devanagari MT"); >+pref("font.name-list.serif.x-devanagari", "Devanagari MT"); >+pref("font.name-list.monospace.x-devanagari", "Devanagari MT"); Does a new cairo gfx support font.name-list on Mac OS X? If not, we should not add 'font.name-list' now. The same for all other lang/script groups. >+// no suitable fonts for bengali ship with mac os x >+// add this section when fonts exist No font for Bengali is shipped with/available for Mac OS X. >+// no suitable fonts for ethiopic ship with mac os x >+// however several can be freely downloaded >+// TITUS Cyberbit Basic http://titus.fkidg1.uni-frankfurt.de/unicode/tituut.asp >+// FreeSerif http://savannah.nongnu.org/download/freefont/freefont-ttf.tar.gz Which of them is the best? Let's ask an Ethiopian.
Daniel, which Ethiopian font do you like best among freely available TTFs? Is there any stylistic different that corresponds to 'serif', 'sans-serif', 'monospace'?
Hi Jungshik! Presently I'm using the Abyssinica SIL font for both serif and sans-serif: http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=AbyssinicaSIL_Download Which is the best of the very few Ethiopic fonts that are fully Unicode 4.1 compliant By default Ethiopic typefaces have the analog of "serifs". People have experimented with sans-serif like styles, but they mostly just get used in advertising -any website is designed around the classic (serif) style anyway. For monospace TTF I have used the Fixedsys Excelsior (http://fixedsys.org), but I see now that the site is down, hope it comes back. Otherwise go with Code2000. Ah, Code2000 is only free as in beer (I think). I'm not a Mac user, if it has X11 underneath, then there are some fixed width BDF fonts that should be accessible. LMK if you need more info.
(In reply to comment #5) > I tested Tamil (of which you're not sure) on Mac OS 10.4.8 and it seems to work > (I just had a cursory look and need to take another look to make sure the > reordering and shaping actually work.) That would be helpful, as I (still) do not have a 10.4 machine. As the font is an Apple font, and as Cairo-Cocoa finally does proper glyph reordering on Mac OS X in cases I can test, I would expect it should work, but better safe than sorry. > >+pref("font.name-list.serif.x-devanagari", "Devanagari MT"); > >+pref("font.name-list.monospace.x-devanagari", "Devanagari MT"); > > Does a new cairo gfx support font.name-list on Mac OS X? If not, we should not > add 'font.name-list' now. The same for all other lang/script groups. Since we don't actually have more than one font we can use in any of these scripts, those lines should just be removed. (As I recall, in the 2005 patch I simply copied those pref names from the Win/Lin section when these "new" langGroups were added, and I must have missed that they were lists of font names.) > >+// no suitable fonts for bengali ship with mac os x > >+// add this section when fonts exist > > No font for Bengali is shipped with/available for Mac OS X. Change the comment to that, or omit the comment entirely? (In reply to comment #7) > Presently I'm using the Abyssinica SIL font for both serif and sans-serif: > http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=AbyssinicaSIL_Download > > Which is the best of the very few Ethiopic fonts that are fully Unicode 4.1 > compliant Sounds good; even I can tell it's superior to the others :) > For monospace TTF I have used the Fixedsys Excelsior (http://fixedsys.org), but > I see now that the site is down, hope it comes back. Otherwise go with > Code2000. Ah, Code2000 is only free as in beer (I think). Code2000 is actually shareware. It's inexpensive, but not technically "free". It does show up in the Windows section as a default font, so on that precedent I'm happy to include it for the Ethiopic monospaced default. > if it has X11 underneath, then there are some fixed width BDF fonts that should > be accessible. TrueType/PostScript only. Thanks for the info, Daniel! jshin, I'll post a new patch with these changes once I hear back from you about my question about your comment on the "no suitable fonts" comment in the patch and with further verification on Tamil. I'll also roll in the changes to fix bug 287509, if you don't mind, since the Thai fonts now work properly under Cairo, too.
Comment on attachment 249906 [details] [diff] [review] updated to tip Cancelling this review request because the patch as-is is not correct and there are a few other questions that need answering before I can attach a new one.
Attachment #249906 - Flags: review?(jshin1987)
jshin, have you had a chance to look at Tamil and my question in comment 8?
I can confirm that pages in Tamil display correctly in Camino Version 2007031502 (1.2+), with the exception of submit button labels in forms. I used the Tamil Wiki pages at http://tinyurl.com/87rm9 I'm willing to test the changes with regards to Tamil, when they are incorporated into the Camino trunk. Thanks for Uncle Asad (from the Camino team) for pointing me in the right direction.
(In reply to comment #11) > I can confirm that pages in Tamil display correctly in Camino Version > 2007031502 (1.2+), with the exception of submit button labels in forms. > > I used the Tamil Wiki pages at http://tinyurl.com/87rm9 > > I'm willing to test the changes with regards to Tamil, when they are > incorporated into the Camino trunk. > > Thanks for Uncle Asad (from the Camino team) for pointing me in the right > direction. > I forgot to mention in the earlier post - I had to add the following to the user.js (as suggested by Uncle Asad) for the pages to display correctly: user_pref("font.name.serif.x-tamil", "InaiMathi"); user_pref("font.name.sans-serif.x-tamil", "InaiMathi"); user_pref("font.name.monospace.x-tamil", "InaiMathi"); user_pref("font.name-list.serif.x-tamil", "InaiMathi"); user_pref("font.name-list.monospace.x-tamil", "InaiMathi");
Here's the updated version. I left the comments for the langGroups we don't have suitable fonts for, and I added the Thai changes to fix bug 287509. It doesn't look like we're actually using the "right" Thai font, but we are using Thai fonts and displaying Thai properly, so I think it's better to restore the proper default fonts now and file another bug on making them work correctly, since we're not actually rendering using the pref-specified font for a lot of langGroups on the trunk right now :( jshin, I'm hoping you will have a chance to review this :)
Attachment #249906 - Attachment is obsolete: true
Attachment #259293 - Flags: review?
Comment on attachment 259293 [details] [diff] [review] v3 (add Thai, and no spurious font-list prefs) Er, this must have zapped by ambiguous match :( Really requesting review; jshin, I'm hoping you will have a chance to review this. See comment 13 for my notes.
Attachment #259293 - Flags: review? → review?(jshin1987)
(In reply to comment #8) > > >+// no suitable fonts for bengali ship with mac os x > > >+// add this section when fonts exist > > > > No font for Bengali is shipped with/available for Mac OS X. There actually are Bengali AAT Unicode fonts available now, সোলাইমান লিপি and রূপালী from http://ekushey.org/?page/osx, but the current state of the trunk does not render Bengali text correctly yet :(
Comment on attachment 259293 [details] [diff] [review] v3 (add Thai, and no spurious font-list prefs) smontagu, since jshin hasn't replied here in a while, could you look at this instead?
Attachment #259293 - Flags: review?(jshin1987) → review?(smontagu)
Now that I have a Mac I can review this, but I see from recent comments in bug 361986 that you want to refresh the patch and remove FixedSys Excelsior, so I'll wait for the next iteration. I think that we don't want to use Code2000 on the Mac either, since it has problems with complex text as mentioned there.
Since I'm refreshing this to remove those problematic fonts, is there any reason not to do bug 153296 (and bug bug 390901 comment 18) while I'm at it? That would fix all the outstanding "bad defaults" on Mac OS X bugs I'm aware of....
Go for it.
Thank you, Smokey. I don't know which font is good instead of "Song" in zh-CN. Gen-san: Current zh-CN (Simplified Chinese) default serif font of MacOS X is not installed on most environments, therefore, we should change it if there is a better font. Do you know it? Or do you know good people for this issue? And I have a question, why the Japanese default font size is '14'. On other platforms, it is '16'. It makes incompatibility between mac and non-Mac. (Especially, when authors uses relative size for font-size, width and height.) If there are no reasons, we should change it in Fx3, I think. I'll post this issue to Bugzilla-jp.
(In reply to comment #20) > And I have a question, why the Japanese default font size is '14'. On other > platforms, it is '16'. It makes incompatibility between mac and non-Mac. > (Especially, when authors uses relative size for font-size, width and height.) > If there are no reasons, we should change it in Fx3, I think. I'll post this > issue to Bugzilla-jp. > I was once told 'because Japanese fonts are bigger than others' or something like that. Which is certainly not true on OS X [1]. It goes back to OS 9 days and the fonts shipped by Apple with its Japanese language pack I think. But I see no reason to have it different from other browsers/platforms/lang groups (all other OS X browsers use 16px for JPN).
> Do you know it? Or do you know good people for this issue? Masayuki- let me ask some people I know in China. I will add them to this bug.
I browsed the CVS log for all.js - see Bug 87871 for the mystery of 14px. On Mac OS X, Japanese default font is *anti-aliased* Hiragino Kaku Gothic Pro W3. So there is no reason to keep the OS 9 optimized size.
I am being told that Mac OS X has a serif font "ST Song" that we might want to consider for the default. http://blog.mozilla.com/gen/2007/08/27/default-serif-font-for-chinese-zh-cn/
thanks. Smokey: Would you change the default Japanese font size to 16 in next patch? (both variable and fixed.)
Smokey: And you should define "font.name-list." for new languages (or should change them if it is defined). It is used for second option. Even if the user changes the "font.name." to western fonts, the text of the language should be rendered fast. See other language settings in latest trunk.
I also found this resource: http://www.alanwood.net/unicode/fonts_macosx.html#simplified STKaiti – 30,946 glyphs in version 1.0d3e3 (local font) Format: TrueType Ranges: Basic Latin; Latin-1 Supplement; Latin Extended-A; Latin Extended-B (few); Spacing Modifier Letters; Combining Diacritical Marks; Greek; Cyrillic; Arabic; Tibetan; Mongolian; General Punctuation; Number Forms; Arrows; Mathematical Operators; Miscellaneous Technical; Enclosed Alphanumerics; Box Drawing; Block Elements; Geometric Shapes; Miscellaneous Symbols; CJK Radicals Supplement; Ideographic Description Characters; CJK Symbols and Punctuation; Hiragana; Katakana; Bopomfo; Enclosed CJK Letters and Months; CJK Compatibility; CJK Unified Ideographs Extension A; CJK Unified Ideographs; Yi Syllables; Yi Radicals; CJK Compatibility Ideographs; Arabic Presentation Forms-A; CJK Compatibility Forms; Small Form Variants; Arabic Presentation Forms-B; Halfwidth and Fullwidth Forms OpenType Layout Tables: Han Ideographic Family: Serif Styles: Regular Availability: Included with Mac OS X 10.2 STSong – 30,946 glyphs in version 1.0d3e3 (local font) Format: TrueType Ranges: Basic Latin; Latin-1 Supplement; Latin Extended-A; Latin Extended-B (few); Spacing Modifier Letters; Combining Diacritical Marks; Greek; Cyrillic; Arabic; Tibetan; Mongolian; General Punctuation; Number Forms; Arrows; Mathematical Operators; Miscellaneous Technical; Enclosed Alphanumerics; Box Drawing; Block Elements; Geometric Shapes; Miscellaneous Symbols; CJK Radicals Supplement; Ideographic Description Characters; CJK Symbols and Punctuation; Hiragana; Katakana; Bopomfo; Enclosed CJK Letters and Months; CJK Compatibility; CJK Unified Ideographs Extension A; CJK Unified Ideographs; Yi Syllables; Yi Radicals; CJK Compatibility Ideographs; Arabic Presentation Forms-A; CJK Compatibility Forms; Small Form Variants; Arabic Presentation Forms-B; Halfwidth and Fullwidth Forms OpenType Layout Tables: Han Ideographic Family: Serif Styles: Regular Availability: Included with Mac OS X 10.2
It seems as if STKaiti and STSong are the two serif, TrueType, Unicode fonts that ship default with the Mac that we should be considering.
A Chinese friend (writer and translator) recommends STSong. That is what she uses in all her writing work.
Flags: blocking1.9?
STFangsong is also a serif TrueType font that ships default with 10.2. STFangsong – 30,946 glyphs in version 1.0d3e3 (local font) Format: TrueType Ranges: Basic Latin; Latin-1 Supplement; Latin Extended-A; Latin Extended-B (few); Spacing Modifier Letters; Combining Diacritical Marks; Greek; Cyrillic; Arabic; Tibetan; Mongolian; General Punctuation; Number Forms; Arrows; Mathematical Operators; Miscellaneous Technical; Enclosed Alphanumerics; Box Drawing; Block Elements; Geometric Shapes; Miscellaneous Symbols; CJK Radicals Supplement; Ideographic Description Characters; CJK Symbols and Punctuation; Hiragana; Katakana; Bopomfo; Enclosed CJK Letters and Months; CJK Compatibility; CJK Unified Ideographs Extension A; CJK Unified Ideographs; Yi Syllables; Yi Radicals; CJK Compatibility Ideographs; Arabic Presentation Forms-A; CJK Compatibility Forms; Small Form Variants; Arabic Presentation Forms-B; Halfwidth and Fullwidth Forms OpenType Layout Tables: Han Ideographic Family: Serif Styles: Regular Availability: Included with Mac OS X 10.2
Sorry about the delay on getting this up (and for not cancelling the review on the old one; I thought I'd done that). This should address all of the issues we've discussed since the last patch, plus bug 153296 (Arabic and Hebrew) and Bengali, since the assertions and rendering bugs seem to be gone in current trunk builds. Mayasuki-san, I assumed that since STSong has a localized Chinese name, I should use it, so I did. I also have a couple of other thoughts: since font fallback is still a little hit-and-miss, should we go ahead and assign fonts for cursive and fantasy for all the langGroups (even if there's only one suitable font available for the langGroup)? Also, though there are no suitable free fonts for Khmer and Malayalam, I remembered that XenoType Technologies used to do lots of language kits for the classic Mac OS, and they've been slowly porting their fonts to Mac OS X. http://xenotypetech.com/osxCambodian.html and http://xenotypetech.com/osxMalayalam.html kits are available, so anyone on the Mac who reads Khmer or Malayalam will have these fonts; should we go ahead and set these fonts as defaults?
Attachment #259293 - Attachment is obsolete: true
Attachment #280301 - Flags: review?(smontagu)
Attachment #259293 - Flags: review?(smontagu)
This is an updated version of a testcase jshin and I made for a previous font prefs bug (I've added all the other "new" langGroups here); it specifies an HTML lang attribute and uses the five CSS generic families.
Attachment #187763 - Attachment is obsolete: true
> I assumed that since STSong has a localized Chinese name, I should use it, so I did. Simon- thanks for your work on this. I still think we need to get more zh-CN eyes on this bug to determine if STSong is indeed the appropriate font or not. We need to determine if STKaiti, STFangsong or STSong is the appropriate font. Not sure who should be making the call but if I am not mistaken, I do not see any native Chinese readers on this bug.
(In reply to comment #31) > Mayasuki-san, I assumed that since STSong has a localized Chinese name, I > should use it, so I did. It's good. > I also have a couple of other thoughts: since font fallback is still a little > hit-and-miss, should we go ahead and assign fonts for cursive and fantasy for > all the langGroups (even if there's only one suitable font available for the > langGroup)? Probably, no. Win/Linux prefs don't have them at many langGroups. Because many langGroups don't have them. I think they should be found from systems by gfx code. But they will not be found on most systems, so, web page authors should not want to find the family fonts.
er, and we should remove (or comment out) the prefs which value is 'xxx'. because they make wasteful damage for performance when the family is specified.
Comment on attachment 280301 [details] [diff] [review] v4, with Arabic, Hebrew, Bengali, jp sizes, and zh-CN STSong John, I'd like your input on this too. It seems to make bug 361986 kick in for me.
Attachment #280301 - Flags: review?(jdaggett)
This looks fine. I ran this with the testcase for bug 361986 and confirmed that ATSUI is picking up the prefs fonts and matching correctly in the font fallback case. We may need to change the use of Ayuthaya for font.name.monospace.th which causes bug 392209 under 10.5 but we can do this later. Simon, I don't have magic review powers. If you run Minefield with this all.js patch and still run into problems, please attach the debug output using my patch for bug 361986, that way I can track down what the problem is: https://bugzilla.mozilla.org/attachment.cgi?id=280433
Comment on attachment 280301 [details] [diff] [review] v4, with Arabic, Hebrew, Bengali, jp sizes, and zh-CN STSong OK, my problems earlier were due to user error, namely testing with the wrong build.
Attachment #280301 - Flags: review?(smontagu) → review+
(In reply to comment #34) > > I also have a couple of other thoughts: since font fallback is still a little > > hit-and-miss, should we go ahead and assign fonts for cursive and fantasy for > > all the langGroups (even if there's only one suitable font available for the > > langGroup)? > > Probably, no. Win/Linux prefs don't have them at many langGroups. Because many > langGroups don't have them. I think they should be found from systems by gfx > code. But they will not be found on most systems, so, web page authors should > not want to find the family fonts. (In reply to comment #35) > er, and we should remove (or comment out) the prefs which value is 'xxx'. > because they make wasteful damage for performance when the family is specified. If a web developer is specifying "fantasy" or "cursive" (perhaps because he's listed a bunch of Windows fonts and doesn't know what Mac fonts to use), wouldn't it be better for us (and for our perf) to have *something valid* defined in these cases, rather than to simply drop into font fallback (and then possibly end up with some random font that doesn't have very well-crafted glyphs for the langGroup's characters)? Isn't font.name-list.style.XX designed to provide a valid font we can use before resorting to font fallback, even if the user has chosen poorly, or did I misunderstand comment 26?
Blocks: 392209
(In reply to comment #39) Yes, the font.name-list.xxx defaults are intended as backups in case glyphs cannot be found in the user-specified pref fonts. We don't have to provide a default font.name-list.xxx if there aren't fonts that are standard defaults for a given script.
Comment on attachment 280301 [details] [diff] [review] v4, with Arabic, Hebrew, Bengali, jp sizes, and zh-CN STSong John has said he's OK with this, so removing the extra review request.
Attachment #280301 - Flags: review?(jdaggett) → superreview?(roc)
Attachment #280301 - Flags: superreview?(roc) → superreview+
Comment on attachment 280301 [details] [diff] [review] v4, with Arabic, Hebrew, Bengali, jp sizes, and zh-CN STSong we need a1.9 for this.
Attachment #280301 - Flags: approval1.9?
Attachment #280301 - Flags: approval1.9? → approval1.9+
Should I attach a new patch removing the XXX.cursive and XXX.fantasy lines, or will someone do that on checkin (I don't have cvs privs)?
(In reply to comment #43) > Should I attach a new patch removing the XXX.cursive and XXX.fantasy lines, or > will someone do that on checkin (I don't have cvs privs)? New patch just for check-in would be nice. :)
checked-in thank you, Smokey!
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: blocking1.9?
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M9
Thank you, Masayuki-san (and everyone else who helped here)!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: