Closed Bug 550772 Opened 15 years ago Closed 15 years ago

fallback pref font handling for CJK fonts is broken

Categories

(Core :: Graphics, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a3
Tracking Status
blocking2.0 --- final+

People

(Reporter: mozilla.dancho, Assigned: masayuki)

References

Details

(Keywords: regression)

Attachments

(5 files, 2 obsolete files)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; ja-JP-mac; rv:1.9.1.8) Gecko/20100205 (Not Firefox/3.5) SeaMonkey/2.0.3 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.3a3pre) Gecko/20100307 Minefield/3.7a3pre The system font emulation has been broken on Mac. See attachment file. Reproducible: Always Steps to Reproduce: 1.Update Trunk fin Actual Results: Broken the fonts Expected Results: Thing correctly displayed about:buildconfig Source Built from http://hg.mozilla.org/mozilla-central/rev/7a2802932585 Build platform target powerpc-apple-darwin9.2.0 Build tools Compiler Version Compiler flags gcc-4.2 -arch ppc gcc version 4.2.1 (Apple Inc. build 5564) -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -W -Wno-long-long -gdwarf-2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -fno-strict-aliasing -fpascal-strings -fno-common -pthread -DNO_X11 -DNDEBUG -DTRIMMED -O3 g++-4.2 -arch ppc gcc version 4.2.1 (Apple Inc. build 5564) -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wno-long-long -gdwarf-2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -fno-strict-aliasing -fpascal-strings -fno-common -fshort-wchar -pthread -DNO_X11 -DNDEBUG -DTRIMMED -O3 Configure arguments --target=powerpc-apple-darwin9.2.0 --with-macos-sdk=/Developer/SDKs/MacOSX10.5.sdk --enable-application=browser --enable-update-channel=nightly --enable-update-packaging --enable-tests --enable-codesighs --disable-install-strip Source Built from http://hg.mozilla.org/mozilla-central/rev/7a2802932585 Build platform target i386-apple-darwin9.2.0 Build tools Compiler Version Compiler flags gcc-4.2 -arch i386 gcc version 4.2.1 (Apple Inc. build 5564) -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -W -Wno-long-long -gdwarf-2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -fno-strict-aliasing -fpascal-strings -fno-common -pthread -DNO_X11 -DNDEBUG -DTRIMMED -O3 g++-4.2 -arch i386 gcc version 4.2.1 (Apple Inc. build 5564) -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wno-long-long -gdwarf-2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -fno-strict-aliasing -fpascal-strings -fno-common -fshort-wchar -pthread -DNO_X11 -DNDEBUG -DTRIMMED -O3 Configure arguments --target=i386-apple-darwin9.2.0 --with-macos-sdk=/Developer/SDKs/MacOSX10.5.sdk --enable-application=browser --enable-update-channel=nightly --enable-update-packaging --enable-tests --enable-codesighs --disable-install-strip
Attached image Font Setting Window
Font Setting Window-1
Attached image Most Visited Folder
Most Visited Folder
Component: General → Graphics
Product: Firefox → Core
QA Contact: general → thebes
Version: unspecified → Trunk
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Attached image Library Window
Library Window
Please add a clearer description of what you think the bug is here along with steps to reproduce the problem.
regression range: c9ff351b0738 (OK) - 1936b0d5f431 (NG) (In reply to comment #4) > Please add a clearer description of what you think the bug is here along with > steps to reproduce the problem. When you type any Japanese characters in searchbar, you can see Chinese font's glyphs, not Japanese font's.
Bug 441110 seems most likely out of those....
Blocks: 441110
blocking2.0: --- → ?
(In reply to comment #7) > Bug 441110 seems most likely out of those.... Confirmed that the changeset associated with this bug causes the problem: http://hg.mozilla.org/mozilla-central/rev/580c63190d26
Attached file testcase
Simple testcase.
http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/src/nsUnicodeRange.h > 42 // The following constants define unicode subranges > 43 // values below kRangeNum must be continuous so that we can map to > 44 // lang group directly. > 45 // all ranges we care about should be defined under 32, that allows > 46 // us to store range using bits of a PRUint32 > 9.15 -const PRUint8 kRangeSetStart = 30; // range set definition starts from here > 9.16 -const PRUint8 kRangeSetLatin = 30; > 9.17 -const PRUint8 kRangeSetCJK = 31; > 9.18 -const PRUint8 kRangeSetEnd = 31; // range set definition ends here > 9.19 +const PRUint8 kRangeSetStart = 31; // range set definition starts from here > 9.20 +const PRUint8 kRangeSetLatin = 31; > 9.21 +const PRUint8 kRangeSetCJK = 32; > 9.22 +const PRUint8 kRangeSetEnd = 32; // range set definition ends here
taking.
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Attached patch Patch v1.0 (obsolete) — Splinter Review
The actual cause is the gfxPlatForm part. The enum shouldn't be used as bit mask right now. I think that the nsUnicodeRange.h should be restored. I never found any problems, but that needs to change the rules, so, it's risky.
Attachment #431042 - Flags: review?(jdaggett)
Allow pref lang values outside [1..31].
Summary: The system font emulation has been broken on Mac → fallback pref font handling for CJK fonts is broken
Attachment #431047 - Attachment is obsolete: true
Comment on attachment 431042 [details] [diff] [review] Patch v1.0 Looks good. Use "grow larger" rather than "grow up".
Attachment #431042 - Flags: review?(jdaggett) → review+
Attached patch Patch v1.0.1Splinter Review
Thank you, John-san. I'll land the patch tonight.
Attachment #431042 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a3
Sorry, I couldn't catch the error before landing 441110.
If I reviewed that, I took same mistake. I think the actual cause of the regression is that the note isn't in the diff file. When we define some constants, we should write the note near an important constant rather than the top of the definitions.
Thanks for fixing this, Masayuki, and sorry for making such a careless mistake.
blocking2.0: ? → final+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: