Closed Bug 69139 Opened 24 years ago Closed 23 years ago

RFE: X font fallback should look in doc's langgroup before random

Categories

(Core :: Internationalization, enhancement, P1)

x86
Linux
enhancement

Tracking

()

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: bstell, Assigned: bstell)

References

Details

(Keywords: intl, Whiteboard: patch under review (patch in bug 67732))

Attachments

(1 file)

when the glyph is not available the fallback code should look in langgroup fonts 
before enumeration all font which gives a random selection

This should be the fallback just after looking for a subplane.
See: http://bugzilla.mozilla.org/show_bug.cgi?id=67732
Blocks: 60916
If the page is unicode (ie: does not have a langGroup) use the langGroup of the 
primary font. The primary font's langGroup is a strong hint from the user as to 
which langGroup they prefer.
Sun Asian Localization center thinks this is a P1 (I don't have the permission
to do this in bugzilla) and a showstopper, the good example is the first
Character in the translation of menu
'Stop', it is displayed using a wrong glyph which might come from a Japanese
fonts file.

BTW, it might be a very serious problem if Mozilla/NSCP 6.0 doesn't support
GB18030 which is a supperset of GBK and is a mandatory Standard in P.R.China.
The above problems are found in zh.GBK locale using the default fonts setting.
After I added gbk-0 fonts to the prefs.js, the problems are fixed, so the fix we
need is to use gbk-0 fonts for all of the none GB2312 Characters in zh_CN
language.
Thanks.
Brian.
When you say

   "After I added gbk-0 fonts to the prefs.js, the problems are fixed"

do you mean that you selected a Simplified Chinese font in the font preference 
dialog?
No, I manually created a GBK Profile using ./mozilla -profileManager and added
the following lines in ~/.mozilla/GBK/dn2wdw4q.slt/prefs.js:
user_pref("font.name.monospace.zh-CN", "dt-interface user-gbk-0");
user_pref("font.name.sans-serif.zh-CN", "dt-interface user-gbk-0");
user_pref("font.name.serif.zh-CN", "dt-interface user-gbk-0");

A very simple question, can Mozilla/NSCP6.x use a locale or charset (not
language) specific configuration file so that we can specify
user_pref("font.name.*") for different locale/charset? That will fix most of the
current showstoppers in Asian languages support.
Brian@Sun,

You're seeing bug 66744 when you use gb2312 fonts for zh-CN as I mentioned.
We, Sun (distributor of Mozilla) can choose the default setting.
That was my question. How is the result when you use gbk-0 fonts?
Actually, zh_CN.EUC locale of Solaris does not have gbk-9 fonts, so
the glyphs may not become beautiful. Please see my comments of
the bug report.

For GB18030, if you could not find in bugzilla about the issue,
how about filing separate bug?

No, you misunderstand my question, what we need is to use different fonts for 
different locales: gb2312 fonts for zh_CN.EUC and gbk fonts for zh_CN.GBK and 
zh_CN.UTF-8, not to use either of them in all of the zh_CN.* locales. I heard 
that NSCP6.0 was language sensitive, not locale sensitive, right?
>If the page is unicode (ie: does not have a langGroup) use the langGroup of the 
>primary font. The primary font's langGroup is a strong hint from the user as to 
>which langGroup they prefer.

When the charset is a Unicode-based one (e.g. UTF-8), then Mozilla falls back
to the locale. See nsLanguageAtomService.cpp:

http://lxr.mozilla.org/seamonkey/source/intl/locale/src/nsLanguageAtomService.cp
p#229
Hi Brian, my last comments were not for your question of 2001-02-26.

I understand we're not able to specify the font setting per locale.
The setting is provided per language.

Mozilla does not currently support locale-charset-specific default fonts. It
just has one default font for each language group/generic font:

http://lxr.mozilla.org/seamonkey/source/modules/libpref/src/unix/unix.js
Changed QA contact to ylong@netscape.com.
QA Contact: teruko → ylong
Per Brian@Netscape's request, I am listing the problems and requirements in
Mozilla for the two Chinese languages:

1. Problem --- Simplified Chinese: Japanese fonts are used in Menu items
   Requirement --- Use gb2312 fonts
2. Problem --- Traditional Chinese: Japanese fonts and Simplified Chinese fonts
are used in Menu
   Requirement --- Use BIG5 fonts
3. Problem --- Simplified Chinese: cannot display some native GBK characters
   Requirement --- Use gb2312 fonts as default, gbk fonts as fallback
4. Problem --- Traditional Chinese: cannot display some native BIG5 characters
   Requirement --- Use BIG5 fonts as default
5. Problem --- Traditional Chinese: cannot display native CNS11643-2 Characters
   Requirement --- Use both CNS11643-1 and CNS11643-2 fonts

Thanks.
Brian@Sun
6. Problem --- Simplified Chinese, cannot display some UTF-8 encoded Chinese
Characters
   Requirement --- Use GB2312 fonts as default, use gbk fonts as fallback.
7. Problem --- Traditional Chinese, cannot display some UTF-8 encoded Chinese
Characters
   Requirement --- Use BIG5 fonts as default, use gbk fonts as fallback.
Severity: normal → enhancement
Status: NEW → ASSIGNED
Summary: X font fallback should in langgroup before random → RFE: X font fallback should in langgroup before random
Target Milestone: --- → mozilla0.9
I've started debugging around the codes of gfx/gtk.
P1 bug for Sun;  setting Priority = P1;  adding intl, nsbeta1 keywords
Keywords: intl, nsbeta1
Priority: -- → P1
Summary: RFE: X font fallback should in langgroup before random → RFE: X font fallback should look in doc's langgroup before random
Target Milestone: mozilla0.9 → mozilla0.9.1
please see the patch in bug 67732
Whiteboard: patch under review (patch in bug 67732)
fix checked in as part of the checkin for bug 67732
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
byuan: can you describe how to QA this?
Changed QA contact to teruko@netscape.com for now.
QA Contact: ylong → teruko
QA Contact: teruko → ylong
To verify this:

1. remove font path for gb2312.1980-0
2. set gb2312 fonts for zh-CN
3. add font path for gbk-0 and other asian fonts
4. export NS_FONT_DEBUG=1
4. try to browse gb1213 characters page on Mozilla

gbk-0 fonts should be used as top priority by this fix.
Without fix, jis and cns fonts are used.

I've personally verified on my environment.

Mark as verified since it wroks fine on 09-04 trunk build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: