Closed Bug 108012 Opened 24 years ago Closed 24 years ago

text measurment on win xp have problem with unicode while word-spacing and letter-spacing is present

Categories

(Core :: Layout, defect)

All
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ftang, Assigned: shanjian)

Details

Attachments

(4 files)

this is really a win XP bug. Not sure can be reproduce on win2000 or not. We cannot reproduce this on NT. We find this bug while we look at buscape bug 9852. We probably can word around 9852 by change css but the real problem is in GFX While word-spacing and letter-spacing is present. The Unicode measurement behavior have problem on winxp
hum... it looks like the above test cases does NOT show the problem on XP. Please ignore them.
also look at bugscape 10647
reassign to myself.
Assignee: ftang → shanjian
In function "nsRenderingContextWin :: GetWidth", there are lines, #ifdef IBMBIDI WORD charType=0; if (::GetStringTypeW(CT_CTYPE3, &ch, 1, &charType) && (charType & C3_DIACRITIC) && !(charType & C3_ALPHA)) { // aWidth = 0; GetWidth(buf, 1, aWidth, aFontID); aWidth *=-1; return NS_OK; } #endif return GetWidth(buf, 1, aWidth, aFontID); Very unfortunately, japanese character u30fc (katakana-hiragana prolonged sound mark) is tested as a diacritic and not a alphbet, and its width is multiplied by negative one, that cause the overlapping. This problem only happens when u30fc is being measured by itself, that's why letter-spacing need to be present.
Status: NEW → ASSIGNED
add simon to cc list
Attached patch proposed patchSplinter Review
I talked to simon today, and he told me the whole bunch of bidi hack can/should be removed.
Just to fill in some background: that IBMBIDI block was part of an attempted hack to fix bug 60546, but it wasn't very successful and I had intended to remove it before submitting the diffs for the big bidi checkins last March, and work on a better fix later. That this portion remained when the rest was blown away was purely an oversight on my part. Removing it will have no negative side effects on Bidi rendering.
simon, can you put r= there if you believe my patch is fine? thanks!
Attachment #57075 - Flags: review+
Comment on attachment 57075 [details] [diff] [review] proposed patch r=smontagu
Marc, could you sr?
Comment on attachment 57075 [details] [diff] [review] proposed patch sr=attinasi - go!
Attachment #57075 - Flags: superreview+
fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: