Closed
Bug 253143
Opened 20 years ago
Closed 7 years ago
Letter spacing is applied to zero width characters (zwsp, zwj, zwnj)
Categories
(Core :: Layout: Text and Fonts, defect)
Core
Layout: Text and Fonts
Tracking
()
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: mozilla, Assigned: jfkthame)
References
(Blocks 1 open bug)
Details
Attachments
(5 files, 1 obsolete file)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7) Gecko/20040724 Firefox/0.9.1+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7) Gecko/20040724 Firefox/0.9.1+
Where a zero width space exists but there is no line-break, CSS letter-spacing
is applied to the zero width space.
Testcase follows.
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Reporter | ||
Comment 1•20 years ago
|
||
Reporter | ||
Updated•20 years ago
|
Summary: Letter- spacing is applied to zero width spaces even when the line does not break → Letter spacing is applied to zero width spaces even when the line does not break
Comment 2•20 years ago
|
||
Opera 7.5 behaves the same.
IE6 behaves as expected.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 3•20 years ago
|
||
Added another line (to the top) - a "control group" with no zero-width spaces.
The second line should look like the first line. Failing that, the third line
should look like the first line - it has negative word-spacing applied. The
fourth line demonstrates that positive word-spacing also isn't applied to
zero-width spaces.
Reporter | ||
Updated•20 years ago
|
Attachment #154392 -
Attachment is obsolete: true
Reporter | ||
Comment 4•19 years ago
|
||
(In reply to comment #3)
> Failing that, the third line
> should look like the first line - it has negative word-spacing applied. The
> fourth line demonstrates that positive word-spacing also isn't applied to
> zero-width spaces.
By the way, these bits are bug 253144.
Comment 6•14 years ago
|
||
Editing summary per duplicate bug.
Summary: Letter spacing is applied to zero width spaces even when the line does not break → Letter spacing is applied to zero width characters (zwsp, zwj, zwnj)
Comment 7•14 years ago
|
||
This used to work just fine in Firefox 3.6, but Firefox 4 beta 6 suffers from this bug again.
Comment 8•14 years ago
|
||
New testcase with actual sample words from German that were displayed fine in Firefox 3.6 on Mac OS but incorrectly on Firefox 4 Beta 7 (and 6).
Comment 9•10 years ago
|
||
I’m adding an updated testcase. It unifies the two existing testcases by testing all of the three characters mentioned in the title of this bug, removes extraneous tests of the word-spacing property, and uses modern HTML.
In this testcase, only the test involving the zero‐width space character fails to display correctly in Firefox 34. The tests for the other two characters, zero‐width non‐joiner and zero‐width joiner, are displayed correctly. (So, apparently, this bug is 2⁄3s of the way fixed.)
As for other browsers, Chrome 39 displays the entire testcase correctly, and Internet Explorer 11 fails the same test as Firefox.
I’m on Windows 8.1, so the platform listed (x86 Windows XP) must be incorrect.
Comment 10•10 years ago
|
||
(In reply to Patrick Garies from comment #9)
> In this testcase, only the test involving the zero‐width space character
> fails to display correctly in Firefox 34. The tests for the other two
> characters, zero‐width non‐joiner and zero‐width joiner, are displayed
> correctly. (So, apparently, this bug is 2⁄3s of the way fixed.)
>
Not exactly, I think. Although zero‐width non‐joiner and zero‐width joiner don't contribute to letter-spacing they can still affect font selection (tested on FF36 Linux 64). As a result, texts contains zero‐width non‐joiner or zero‐width joiner may looks different from those contains none.
On my computer, "Control"(without special chars) is displayed with font "Source Han Sans SC Normal", while "Test 2" is displayed with fonts "DejaVu Sans" + "Source Han Sans SC Normal", and "Test 3" is displayed with font "DejaVu Sans".
Assignee | ||
Updated•7 years ago
|
Blocks: css-text-3
Component: Layout → Layout: Text
Assignee | ||
Updated•7 years ago
|
OS: Windows XP → All
Hardware: x86 → All
Assignee | ||
Comment 13•7 years ago
|
||
This fixes the problem for the examples here, AFAICS, as well as for similar format characters (zero-width no-break space, word joiner).
Attachment #8953829 -
Flags: review?(jwatt)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Assignee | ||
Comment 14•7 years ago
|
||
Attachment #8953830 -
Flags: review?(jwatt)
Updated•7 years ago
|
Attachment #8953829 -
Flags: review?(jwatt) → review+
Updated•7 years ago
|
Attachment #8953830 -
Flags: review?(jwatt) → review+
Comment 15•7 years ago
|
||
Thanks Jonathan et al for fixing this!
Comment 16•7 years ago
|
||
Comment 17•7 years ago
|
||
Updated•7 years ago
|
Flags: needinfo?(jwatt)
Comment 18•7 years ago
|
||
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9162eefca30f
Do not add letter-spacing after zero-width format controls such as ZWSP. r=jwatt
https://hg.mozilla.org/integration/mozilla-inbound/rev/b81999f30c15
Add a web-platform reftest for letter-spacing in the presence of zero-width format controls. r=jwatt
Created web-platform-tests PR https://github.com/w3c/web-platform-tests/pull/9864 for changes under testing/web-platform/tests
Upstream PR merged
Comment 21•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9162eefca30f
https://hg.mozilla.org/mozilla-central/rev/b81999f30c15
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Reporter | ||
Comment 22•7 years ago
|
||
Thanks everyone for all your work on this over the years, particularly for expanding the scope to other affected characters.
I'm especially impressed by how robust our standard process seems to be now for automated regression testing of web platform features.
Great work everyone!
Comment 23•7 years ago
|
||
Thanks, Tobi and Greg. It's nice to seem some positive comments in bugzilla once in a while. :)
Flags: needinfo?(jwatt)
Comment 24•7 years ago
|
||
Checked letter-spacing in combination with ​ in Nightly - works :)
Upstream PR merged
You need to log in
before you can comment on or make changes to this bug.
Description
•