hyphens:auto renders two hyphens in words like e-commerce
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: mnater, Assigned: jfkthame)
References
Details
Attachments
(3 files)
846 bytes,
text/html
|
Details | |
1.75 KB,
patch
|
jwatt
:
review+
|
Details | Diff | Splinter Review |
2.64 KB,
patch
|
jwatt
:
review+
|
Details | Diff | Splinter Review |
![]() |
||
Updated•7 years ago
|
![]() |
||
Comment 1•7 years ago
|
||
Assignee | ||
Comment 2•7 years ago
|
||
Assignee | ||
Comment 4•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Assignee | ||
Comment 5•7 years ago
|
||
![]() |
||
Comment 6•7 years ago
|
||
![]() |
||
Updated•7 years ago
|
![]() |
||
Comment 7•7 years ago
|
||
Assignee | ||
Comment 8•7 years ago
|
||
(In reply to Jonathan Watt [:jwatt] from comment #6)
Comment on attachment 9041862 [details] [diff] [review]
Reftest for spurious soft-hyphenation occuring at an explicit hyphen after
initial letter of wordReview of attachment 9041862 [details] [diff] [review]:
::: layout/reftests/text/1507661-1-ref.html
@@ +1,2 @@+<!DOCTYPE html>
+<div lang="en">e-mail-<br>ing</div>Maybe make this more explicit with an extra <br>, as in: e-<br>mail-<br>ing
Actually, the expected result is that we don't break after the first hyphen (because the nsLineBreaker code doesn't consider a hyphen usable as a line-break if there's only one letter before or after it in the word). So we get
e-mail-
ing
The bug here is that although nsLineBreaker doesn't mark the hyphen as a line-break, the code in BreakAndMeasureText still goes ahead and uses it as if it were an optional hyphen position, so we currently end up with
e--
mail-
ing
(ugh).
Rather than have this under some generic and undiscoverable name like 1507661-1.html, it would be better to have this in a relevant directory.
True. Other hyphenation tests are also in layout/reftests/text/, so that seems the appropriate dir, but I can certainly make the name more useful!
![]() |
||
Comment 9•7 years ago
|
||
(In reply to Jonathan Kew (:jfkthame) from comment #8)
Actually, the expected result is that we don't break after the first hyphen
Ah, that makes more sense. Thanks. :)
Comment 10•7 years ago
|
||
Comment 11•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/235a41977032
https://hg.mozilla.org/mozilla-central/rev/70b03f41e1bc
Reporter | ||
Comment 13•6 years ago
|
||
Thanks for your awesome work!
Description
•