Closed Bug 376472 Opened 19 years ago Closed 19 years ago

Zero-width characters rendered incorrectly

Categories

(Core :: Graphics, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: philip, Assigned: pavlov)

References

Details

Attachments

(2 files)

User-Agent: Opera/9.10 (Windows NT 5.0; U; en) Build Identifier: Strings that contain zero-width characters, e.g. bug 366643 comment #13, are rendered incorrectly: the zero-width characters are visible (as some random shape depending on what character it is), and the end of the line disappears if you try selecting the first few characters. The same behaviour occurs on Windows Server 2003 and on Windows 2000. This worked correctly in: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a4pre) Gecko/20070402 Minefield/3.0a4pre It fails in: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a4pre) Gecko/20070403 Minefield/3.0a4pre Reproducible: Always
Attached image incorrect output
The three lines should each look like: x.x.x
Assignee: nobody → pavlov
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch fix1Splinter Review
there are 2 possible fixes here and i'm not sure which one is better. In the patch I landed that regressed this I fixed checking for missing glyphs in 2 ways. First was setting displayZWG before calling Shape (which causes this problem, but fixes others) and the second was by using ScriptGetCMap to tell if we're missing glyphs. Fortunately the ScriptGetCMap path means we don't actually need to set fDisplayZWG, but we can't use SGCMap with surrogates. So I guess the question is are there buggy fonts that support surrogates that need the fDisplayZWG workaround or not. I don't know the answer. Can anyone find a testcase that uses some surrogate zero width characters? The other fix is to just remove the fDisplayZWG all together.
Attachment #260632 - Flags: review?(vladimir)
I am seeing problem with "Zero-width Joiner(NWJ)" and "Zero-width Non-Joiner(NWNJ)" Let me know if I should not create another bug. Example:- 1. ള്‍ NWJ 2. ള്‌ NWNJ
this should have been fixed by 377950
Status: NEW → RESOLVED
Closed: 19 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: