Closed Bug 732479 Opened 13 years ago Closed 11 years ago

CSS hyphens does not wrap a line after hyphen in the text if the second word cannot be hyphenated

Categories

(Core :: Layout: Text and Fonts, defect)

10 Branch
x86
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 809020

People

(Reporter: bugzilla, Unassigned)

References

()

Details

Attachments

(2 files, 1 obsolete file)

Attached image Screenshot
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2 Build ID: 20120215223356 Steps to reproduce: Write an HTML document that contains words combined with a hyphen character (U+002D), for example "DateTime-Wert". Also, the CSS attribute "-moz-hyphens: auto" is set. Actual results: The wrapping occured as "DateTi~me-Wert" although there is enough space for the other two characters "me". Expected results: The wrapping should occur directly at the hyphen that's already present in the text.
Could you please attach a .html file testcase with the specified lang attribute you're using? bug 672320 suggests there are licensing issues with hyphen patterns of some languages. See the "language support notes" at https://developer.mozilla.org/en/CSS/hyphens#Suggesting_line_break_opportunities
Attached file Test case (obsolete) —
This is basically a copy of what I mean, with different text and without all my website around. Unfortunately, the hyphens attribute doesn't work at all, but the line breaking at normal ASCII hyphens is in effect now. I don't know why the CSS attribute actually works on my site and not on this file. But then, there is nothing that tells Firefox the language of the document (which in this case is German (de-de)).
Attachment #602432 - Attachment mime type: text/plain → text/html
Attached file Improved test case
This is an improved test case. It correctly sets the HTML language so that automatic hyphenation is in effect now. It also shows the very text from the screenshot, so that you can see exactly what the problem is. Hyphens (U+002D) in the other paragraph below seem to work, while the one in the first paragraph does not. Just change the browser window width and see how the line wrapping is only in "DateTi-|me-Wert" or around the whole word, but never in "DateTime-|Wert".
Attachment #602432 - Attachment is obsolete: true
Another example: Funktionen zum Überblenden mehrerer Farben, zur Konvertierung zwischen HSL- und RGB-Farbraum, Graustufen-Konvertierung und weitere Hilfsfunktionen zum Umgang mit Farben. This will never break "RGB-Farbraum" after the hyphen that's in it.
Attachment #602666 - Attachment mime type: text/plain → text/html
I tried changing the "DateTime-Wert", 2013-11-15-03-02-03-mozilla-central-firefox-28.0a1.en-US.linux-x86_64. Per below, the BUG occurs if the second word cannot be hyphenated by Firefox; it WFM if the second word can be hyphenated. bug: Hund-Hund bug: Wert-Wert bug: DateTime-Hund bug: Wasser-Wert bug: Wasser-acegh bug: Wasser-abch WFM: DateTime-Wasser WFM: Wasser-Wasser WFM: Wasser-abcegh
Status: UNCONFIRMED → NEW
Component: Untriaged → Layout: Text
Ever confirmed: true
OS: Windows XP → All
Product: Firefox → Core
Summary: CSS hyphens does not wrap a line after hyphen in the text → CSS hyphens does not wrap a line after hyphen in the text if the second word cannot be hyphenated
It's not a question of whether the second word can be hyphenated, but rather a question of how close the potential breakpoint is to the beginning or end of the compound word. Try changing the example to "DateTime-Weaaaaaaaaaaa". The "word" Weaaaaaa cannot be hyphenated under the German rules, regardless of how many 'a's are added. But with "DateTime-Weaaaa" it works (breaks after the explicit hyphen), while with "DateTime-Weaaa" it fails. I'm duping this to bug 809020, as it's a manifestation of the same issue described there in more detail (see bug 809020 comment 4, in particular).
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: