Closed
Bug 84668
Opened 24 years ago
Closed 23 years ago
Ugly Chinese font in dialogs and menu on simplified chinese windows
Categories
(Core :: Internationalization, defect)
Tracking
()
VERIFIED
FIXED
mozilla1.0.1
People
(Reporter: zf, Assigned: shanjian)
References
Details
(Keywords: intl, Whiteboard: [adt2])
Attachments
(6 files, 2 obsolete files)
1.10 KB,
image/gif
|
Details | |
568 bytes,
image/gif
|
Details | |
15.34 KB,
image/jpeg
|
Details | |
244.05 KB,
image/bmp
|
Details | |
9.24 KB,
patch
|
Details | Diff | Splinter Review | |
1.46 KB,
patch
|
ftang
:
review+
alecf
:
superreview+
jud
:
approval+
|
Details | Diff | Splinter Review |
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.1) Gecko/20010607
BuildID: 2001060703
The characters look ugly in the toolbar, menus and dialogs, probably because of
wrong font or font size on simplified chinese version of windows 2k.
Reproducible: Always
Steps to Reproduce:
1. On simplified chinese Windows, add a bookmark with a Chinese title.
2. Pull down the Bookmark menu and u will see the bookmark title
3.
Comment 3•24 years ago
|
||
It seems the size we pick is too small.
German- where do we set the size for skin. It looks you pick a font size too
small for CJK text.
nhotta- please take a look at this. Is the size reasonable for Japanese these
days?
German- are you using size 10 and below?
I agree the text is not readable.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Both modern and classic set the font using what is set as system font. Please
talk to skin master Hewitt (cc'd), if you need anything special here.
Comment 5•24 years ago
|
||
Japanese bookmark text looks fine on JA localized windows (I will attach a
screen shot). But not good on US windows, probably it's system font related as
german's comment.
Comment 6•24 years ago
|
||
Comment 7•24 years ago
|
||
Feng, is your system US version or you are using Chinese localized system?
Updated•24 years ago
|
QA Contact: andreasb → ylong
Comment 9•24 years ago
|
||
ylong, do you have Chinese windows (I think the bug is about Traditional Chinese)?
Comment 10•24 years ago
|
||
I only have Simp. Chinese2k, I'll check it on Traditional Chinese window in lab
later.
Comment 11•24 years ago
|
||
Actually, I just noticed the reporter was using Simp. Chinese2k.
I got very similar result - the Chinese characters(kanji) not very nice, don't
show same as in Japanese Windows(N6.1Ja).
Updated•24 years ago
|
Target Milestone: --- → mozilla0.9.3
Comment 12•24 years ago
|
||
>Both modern and classic set the font using what is set as system font.
do you use the system setting for the size also ? I think the problem is not
what font you use, but also what size you use.
can you kindly point out where is it in the css for bookmark & menu ? Thanks.
Assignee: nhotta → german
Comment 13•24 years ago
|
||
This problem also occurs in the Linux for both traditional and simplified fonts
(mozilla 2001072008). Occurs in bookmark, message list, and the message body.
Comment 14•24 years ago
|
||
Doesn't look like this is getting fixed before the freeze tomorrow night.
Pushing out a milestone. Please correct if I'm mistaken.
Target Milestone: mozilla0.9.3 → mozilla0.9.4
Comment 15•24 years ago
|
||
*** Bug 92211 has been marked as a duplicate of this bug. ***
Updated•24 years ago
|
OS: Windows 2000 → All
Hardware: PC → All
Comment 16•23 years ago
|
||
pushing out 1 milestone, not sure that I should own this, as I am not an expert
on chinese charsets. Somebody on this list wants to own this?
Comment 17•23 years ago
|
||
0.9.5 is out the door. bumping TM up by one.
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Comment 18•23 years ago
|
||
cc'ing Shuehan, since Joe has relinquished his command.
Comment 19•23 years ago
|
||
reassigning, i don't believe this should have belonged to german (or the UE team)
Assignee: german → yokoyama
QA Contact: ylong → teruko
Comment 20•23 years ago
|
||
Let's get tao's opinion to see if we can do something here to
look better in Chinese.
->tao
Assignee: yokoyama → tao
Comment 21•23 years ago
|
||
We need to use debugger to find out why this is happening:
1. are we returning the correct font size to the rendering engine?
2. if yes, is there prettier font available on the system but is not selected
by the browser?
Knowing the answer might help us make the decision as whether to fix the browser
code or assign better font settings for UI (tweak "chrome://global/locale/intl.css"
or default prefs.)
assign to smontagu@netscape.com for (1)
Assignee: tao → smontagu
Comment 22•23 years ago
|
||
The answer to (1) in comment 21 is "Yes". I think the problem is that on a
non-localized system the default system font doesn't contain glyphs for Chinese,
so we are using glyphs from some other font, resized to the size of the system font.
Back to tao.
Assignee: smontagu → tao
Comment 23•23 years ago
|
||
Looks like this won't make it in for 0.9.6.
Comment 24•23 years ago
|
||
Bounce back to i18n group. CC l10n eng
It seems to me the text layout engine needs a bit help to choose prettier fonts on
native system. In theory, a native system should have sufficient font installed
to render reasonable looking native scripts.
Are we using the default system font size? How does Gecko determine what size to
use? In other words, what's the order of precendence regarding font size:
"intl.css", system font size, etc?
Also, re-targetting to 0.9.7
Assignee: tao → yokoyama
QA Contact: ylong → teruko
Target Milestone: mozilla0.9.6 → mozilla0.9.7
Comment 25•23 years ago
|
||
>In theory, a native system should have sufficient font installed
>to render reasonable looking native scripts.
I agree with tao.
>How does Gecko determine what size to use?
I believe Gecko uses the Pref settings
http://lxr.mozilla.org/seamonkey/source/modules/libpref/src/win/winpref.js
Having said, I thought this bug is about the chinese text being ugly in the menu
and dialogbox. Can somebody answer Franks comment (#12)?
>can you kindly point out where is it in the css for bookmark & menu ?
Comment 26•23 years ago
|
||
I think bookmark css is
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/themes/modern/communicator/bookmarks/bookmarks.css
However, I failed to find font facename setting and font size in the CSS
Hewitt: where do we specify the facename and size?
Comment 27•23 years ago
|
||
The default font for all menus, (including the size), is set in |SetFont|
http://lxr.mozilla.org/seamonkey/source/content/base/src/nsRuleNode.cpp#1635,
which (on Windows) calls |SystemParametersInfo| at
http://lxr.mozilla.org/seamonkey/source/gfx/src/windows/nsDeviceContextWin.cpp#358
css for menus is in
http://lxr.mozilla.org/seamonkey/source/themes/modern/global/menu.css and
http://lxr.mozilla.org/seamonkey/source/themes/classic/global/win/menu.css
Comment 29•23 years ago
|
||
The size of menu font can be control by Control Panel:Display:Apperance:Menu
Comment 30•23 years ago
|
||
I use yokoyama's simp chinese w2k system to look at it. The problem is the
following
1. the modern theme listen to the control panel setting (not a problem)
2. in the simp chinese w2k system, if the appearance is set to "window classic"
the font for menu is set to "Tahoma" 8. Which do not have Chinese glyph
3. in IE, when it set to "Tahoma" 8, it use a font fallback algorithm whihc pick
up a nice fallback
4. in Mozilla, when it set to "Tahoma" 8, we SHOULD use the locale font setting
for font fallback, but we don't for some reason.
The real problem is the font fallback algorithm for lang group x-unicode
Comment 31•23 years ago
|
||
this is not a style sheet issue. This is a font fallback algorithm issue on
window. Reassign to shanjian.
As you can see, if user set the "Menu" font to "Song" then we will display
correctly. This is because the "Song" have chinese glyph but tahoma do not. The
problem is our fallback algorithm does not pick up Song while it should.
Assignee: smontagu → shanjian
Comment 32•23 years ago
|
||
shanjian- what is the order of font fallback when a specific font do not have
the glyph ?
Assignee | ||
Comment 33•23 years ago
|
||
First we try the font name if specified by user, and then generic font using font family
name. If still could not find a font, all system fonts will be tried in rather random
order, and first one contains the glyph will be returned.
Comment 34•23 years ago
|
||
>First we try the font name if specified by user, and then
>generic font using font family name.
So... if the font-family is "tahoma" and the lang group is "x-unicode", and the
system locale is "zh-CN", we should try the following
1. "tahoma"
2. the "serif" font of "zh-CN",
3. all other "serif" font for different langauge group
4. all other fonts,
right ? (the reason 2 is "serif" font of "zh-CN" instead of "serif" font of
"x-unicode" is because erik add some code in the nsLanguageAtomService to map
"x-unicode" lang group to the locale lang group.
However, I didn't see 2 happened. Do we pass "zh-CN" down as langgroup ? or
"x-unicode" ? Which font we used ? Why?
Assignee | ||
Comment 35•23 years ago
|
||
Give me a minute and I will give you the whole picture about what's happening.
Can you tell me where is the control panel setting?
Assignee | ||
Comment 36•23 years ago
|
||
Ok, here is what's happening.
To be simple, it is not because we choose the wrong font, but because "we?" choose the
wrong size. On my simplified win2k system, control panel shows default setting is
"tahoma" with size 8, that is interpreted as height of "-11" in creating font. When
this font is failed to display those chinese characters, global font is tried and
"MS song" is found. But size "-11" make the font looks ugly.
Selecting size "9" in control panel menu setting, problem will be gone.
Selecting "Song" but keep size "8", problem is still there.
Some additional detail,
The lang group we are using is x-wester, not x-unicode. That is reasonable because the
whole interface is English. If user using localized chinese UI, we should use
"zh-cn" as lang group. (If not , that will be a bug.)
Status: NEW → ASSIGNED
Assignee | ||
Comment 37•23 years ago
|
||
Solution?
Strictly speaking, this is not a problem of browser. We should honor control panel's setting,
and we should keep all font looks the same size. It is possible to put in a hack in creating
font. That is to use a slightly larger size for CJK font. But I believe many people may hate
the idea and we will create more problems that solved.
Assignee | ||
Comment 38•23 years ago
|
||
Assignee | ||
Comment 39•23 years ago
|
||
I post a screen shot of IE with size 8 and size 9. As you might notice that
they (MS) are using same size for Chinese characters, and different size for
English. For further smaller size (6, 7), chinese character becomes sizable
again.
Comment 40•23 years ago
|
||
>Some additional detail,
>The lang group we are using is x-wester, not x-unicode. That is reasonable
>because the
>whole interface is English. If user using localized chinese UI, we should use
>"zh-cn" as lang group. (If not , that will be a bug.)
Ok, I got it. We add the font setting for the UI locale (user locale) to the
generic list. Should we also add the system locale to the generic list after ?
Look at nsFontMetricsWin.cpp FindGenericFont we first add the font and font-list
of the langgroup to the list, and then we add the gUsersLocale's font and
font-list to the list (if gUsersLocale is differ from langgroup) and then we
call GenericFontEnumContext. Should we add the font and font-list of the
system's locale before we call GenericFontEnumContext ?
If we do so, then we will try simplified Chinese font first before try other
fonts. This will make the English UI build run better on Chinese system.
and also, we should try all font and font-list of other language group
before we try global font.
So... currently, the algorithm is
1. try the font user specify
2. try font and font list of the page's language group
3. try font and font list of the user's ui language group
4. try global font
and I suggest we add
3.1 try font and font list of the system's language group
3.2 try font and font list of the rest language groups
>On my simplified win2k system, control panel shows default setting is
>"tahoma" with size 8, that is interpreted as height of "-11" in creating font.
>When this font is failed to display those chinese characters, global font
> is tried and "MS song" is found.
on roy's chinese system, that is not exactly what we see. It seem's it is not
using "MS song" but some other type face.
Assignee | ||
Comment 42•23 years ago
|
||
frank, it is "Song". All the difference we saw are because of size.
I manually change the size during my debug session and it works.
As for your suggestion about traversing lang group in find generic font.
That looks reasonable to me. How to make it work efficietly is my concern.
I believe it is doable.
Comment 43•23 years ago
|
||
>frank, it is "Song". All the difference we saw are because of size.
That is not what I saw. I agree that size is one major issue. but one another
issue is we didn't pick a reasonable font face neither. I belive we need to
address both issues.
Comment 44•23 years ago
|
||
here is a trial patch
Comment 45•23 years ago
|
||
not sure the trial patch make thing better yet. Need to test on a system which
reproduce the problem easily.
Updated•23 years ago
|
QA Contact: teruko → ylong
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla0.9.8 → mozilla1.0
Comment 46•23 years ago
|
||
-> nsbeta1, it really ugly with Simplified Chinese windows including
WinXP-SimpChinese interface.
Severity: minor → major
Comment 47•23 years ago
|
||
Actually, the above comment was on Multi-lingual WinXP with default language
setting to Simp. Chinese.
On real localized Simp. Chinese WinXP, the font will display fine.
Comment 48•23 years ago
|
||
nsbeta1+
may be we should do this
in the system is Chinese and the font size it return is < 9, return 9
Assignee | ||
Comment 49•23 years ago
|
||
In IE, they only use size 9 font to display size 8 characters for Chinese, all
English strings remain 8. Similar things does not happen if size < 8. That's say
if request size is 6,7,etc, they do display those chinese characters as
requested. AND this happens for UI font only. In html body, all request size if
honored, size 8 chinese font is not allign to 9.
I guess the problem should exist beyond localized chinese win2K. If we implement
a generic solution, (eg. align size 8 to 9 for chinese characters), we will
break something else. This is really a headache.
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla1.0 → mozilla1.0.1
Assignee | ||
Comment 51•23 years ago
|
||
push to 1.01
Comment 52•23 years ago
|
||
ftang - don't you think this should be a nsbeta1+? If we're going to make a
Chinese product, we want it to look okay.
Comment 53•23 years ago
|
||
FYI: (haven't check WinNT-CN and WinME-CN though)
Chinese font look good:
WinXP-CN, Win98-CN
Font has the problem as showing in this bug:
WinXP-Multi-Lingual UI when setting SimpChinese as default language, Win2000-CN
and other non-SimpChinese windows.
Comment 54•23 years ago
|
||
renominate as nsbeta1 - we still see it on many windows system, especially on Win2k.
Comment 55•23 years ago
|
||
Yuying, is this nominated again for Win2k? Is it okay for other Window platforms?
Comment 56•23 years ago
|
||
It's for both - win2k including win2k-SC, WinXP-multiligua UI even you setting
locale as SC, any other non-SC systems.
Comment 57•23 years ago
|
||
we should release note this. People can change their font size by changing
"Control Panel:Appearance". They can select a different font or increase the
font size. The quality of the font is not really in our control. This is really
a MS window's bug instead of an application bug.
nsbeta1- and please release note it.
Comment 58•23 years ago
|
||
Get together with Frank and Xianglan, Frank did some more research on seetins
between system and our prferences, we might have a solution for this.
Renominate as nsbeta1 again.
Comment 59•23 years ago
|
||
so... we decide to do the following, in the simplified chinese system, if the
control panel return 9 or smaller value, return 9 instead.
to implement that. we need to add code to
mozilla/gfx/src/windows/nsDeviceContextWin.cpp GetSysFontInfo method and right
before CopyLogFontToNSFont (or in that function) check the height and when the
size is too small (make sure we cover both the positive case and negativie case)
round up to equal to 9 if it is running on the simplified chinese system
(GetACP() == 936 )
reassign to ftang as adt 2
Comment 60•23 years ago
|
||
I'm using win2k and the default language is traditional chinese. I did not use
chinese menu in mozilla because chinese font in the menu is very difficult to read.
Today I tried to change the font setting in mozilla. I changed all the fonts for
unicode to mingliu (a font for traditional chinese). After restart, the display
of chinese menu is much better. The font is the same as the screenshot from
http://www.csie.ntu.edu.tw/~b7506051/mozilla/screenshot.html
I'm not sure whether it only works in my computer. In my first trial, I needed
to delete Arial Unicode MS font to make things happen.
Comment 61•23 years ago
|
||
shanjian, can you r=
Comment 62•23 years ago
|
||
cc shanjian
Assignee | ||
Comment 63•23 years ago
|
||
We should only replace 8 with 9, and keep rest size (7, 6, etc) unchanged.
Comment 64•23 years ago
|
||
anything below 9 is too small and ugly.
Assignee | ||
Comment 65•23 years ago
|
||
I knew. But any size below 8 must be manually selected by user. If they do it,
they must have a reason and we should respect their choice. Size 8 is special
because it is a default, and this default size is not a good choice.
Comment 66•23 years ago
|
||
shanjian, this value is control by the control pannel. And the user may not
select a specific font size to change it. If user select a differen APPEARANCE
THMEM, the font name and size may change. So what the user may do is to change
from "Window Traditional" to "Window XP" theme, and the size could be change. or
select from "Normal" to "Small" the size could be changed.
remember, this code will only be hit when we access the info from the control
panel, this code does NOT impact the size from our preference window, nor any
direct reference in css or html.
Assignee | ||
Comment 67•23 years ago
|
||
Comment on attachment 85338 [details] [diff] [review]
patch
r=shanjian per ftang's #66.
Attachment #85338 -
Flags: review+
Comment 68•23 years ago
|
||
Comment on attachment 85338 [details] [diff] [review]
patch
is 936 stored anywhere special? i.e. is there a CP_936 or CP_CHINESE_something
#define somewhere that we could be re-using?
if so, lets use that. otherwise, sr=alecf
Attachment #85338 -
Flags: superreview+
Comment 69•23 years ago
|
||
all the documentation refer to 936 directly. There are a SNA header file define
CP_936, but it will create dependency on a wrong header file.
Comment 70•23 years ago
|
||
check into trunk at 6/4 afternoon. Forget to mention that. mark it fixed now.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•23 years ago
|
Comment 71•23 years ago
|
||
Seems the checked-in didn't affect the display in trunk build on both win2k-SC
and WinXP-SC.
Updated•23 years ago
|
Keywords: adt1.0.1,
mozilla1.0.1
Comment 72•23 years ago
|
||
the last patch is wrong. we need to back it out from the trunk and land thie
patch intead.
Attachment #85338 -
Attachment is obsolete: true
Comment 73•23 years ago
|
||
shanjian: can you look at my latest patch and try on your chinese system?
Assignee | ||
Comment 74•23 years ago
|
||
Frank,
I tried your patch on my SC2k. You need to make some modification before it will
work. You need to adjust the size before converting to twips. After that, all
font in menu, dialog, etc use 9 point font instead of 8 point. When we running
mozilla english version on Chinese system, do we really want all those fonts in
9 points? I am kind of hesitant to such a change.
Comment 75•23 years ago
|
||
the fix in trunk is not good. should back it out.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 76•23 years ago
|
||
reassign to shanjian to work on.
Assignee: ftang → shanjian
Status: REOPENED → NEW
Assignee | ||
Comment 77•23 years ago
|
||
Attachment #87162 -
Attachment is obsolete: true
Assignee | ||
Comment 78•23 years ago
|
||
Now change is only limited to size 8.
frank, could you r=?
Status: NEW → ASSIGNED
Comment 79•23 years ago
|
||
Comment on attachment 87308 [details] [diff] [review]
new patch
are you sure you should check and change it before the NSIntPointsToTwips?
should aFont->size be limited to 9 or pointSize be limited to 9? I remember in
my computer I got pointSizet = 11 but NSIntPointsToTwips convert it to 8. Can
you confirm that? Will it change depend on the screen res?
Assignee | ||
Comment 80•23 years ago
|
||
I verified this on my box, pointSize should be limited to 9. I also tried a
different resolution, it works the same way.
Comment 81•23 years ago
|
||
Comment on attachment 87308 [details] [diff] [review]
new patch
r=ftang
Attachment #87308 -
Flags: review+
Assignee | ||
Comment 82•23 years ago
|
||
Alec, could you sr?
Comment 83•23 years ago
|
||
Comment on attachment 87308 [details] [diff] [review]
new patch
sr=alecf
Attachment #87308 -
Flags: superreview+
Assignee | ||
Comment 84•23 years ago
|
||
fix checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Comment 85•23 years ago
|
||
Verified fixed on 06-18 trunk build on both WinXP-SC and Win2k-SC with Chinese
personal toolbar names and bookmark names.
Status: RESOLVED → VERIFIED
Updated•23 years ago
|
Keywords: adt1.0.1,
mozilla1.0.1
Updated•23 years ago
|
Attachment #87308 -
Flags: approval+
Comment 86•23 years ago
|
||
please checkin to the 1.0.1 branch. once there, remove the "mozilla1.0.1+"
keyword and add the "fixed1.0.1" keyword.
Keywords: mozilla1.0.1 → mozilla1.0.1+
Comment 87•23 years ago
|
||
Marking adt1.0.1+ on behalf of the adt for checkin to the 1.0 branch.
Comment 89•23 years ago
|
||
Verified fixed on 06-19 Netscape 1.0 branch build on both WinXP-SC and Win2k-SC
with Chinese personal toolbar names and bookmark names.
Keywords: fixed1.0.1 → verified1.0.1
Updated•23 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•