Closed Bug 1550532 Opened 2 years ago Closed 2 years ago

Suppress auto-hyphenation for Capitalized words [was: Don’t hyphenate proper nouns in English]


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

66 Branch



Tracking Status
firefox68 --- fixed


(Reporter: ragdoll, Assigned: jfkthame)




(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

Used hyphens: auto on p elements.

Actual results:

Hyphenation was turned on, but there is far too much hyphenation. In particular, proper nouns, i.e. names, get hyphenated. Some names, like Justin and Stephanie appear to not be hyphenated, but Prudence doesn’t like it when her name reads as

>                     Pru-
> dence

Likewise, companies don’t like it when their names that happen to use common words are broken across lines.

The only options to address the issue on the developer side are to either code in spans that turn hyphenation off on a word-by-word basis, which is too much to ask when content is distributed among non-technical workers in a large site, or to turn off hyphenation altogether, which is always the result, because it’s the path of least resistance.

Expected results:

Proper nouns in English should never be hyphenated. If, for some reason, they do need to be hyphenated, that should be the edge case, not the other way around.

Hyphen support is uniformly bad across all browsers, but they should be progressive enhancements. As it stands, turning on hyphens degrades the quality of the content and hyphenating proper nouns is the primary reason for that.

Component: Untriaged → Layout: Text and Fonts
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → All

In general, it would be good to have more sophisticated control of hyphenation. (CSS Text 4 introduces some additional properties[1] to provide more control, but is a long way from being implemented at this point.)

Perhaps we should consider excluding capitalized words from auto-hyphenation for the time being. I suspect that would be an improvement in more cases than not.


Ever confirmed: true
Priority: -- → P3
Summary: Don’t hyphenate proper nouns in English → Suppress auto-hyphenation for Capitalized words [was: Don’t hyphenate proper nouns in English]

If we do this, it'll have to be lang-specific, I think; we wouldn't want to suppress hyphenation of capitalized words in German, for example, or all its Wonderfullylongcompoundnouns will become unhyphenatable.

This affects a number of our existing reftests, so we'll need to update those
to not expect hyphenation of a sentence-initial (capitalized) word.

(Hyphenation behavior is not sufficiently well-specified for this to be tested
at the WPT level, so we just use Gecko-specific reftests.)

Attachment #9064453 - Attachment description: Bug 1550532 - Avoid hyphenating capitalized words, except for German. r=emilio → Bug 1550532 - Avoid auto-hyphenating capitalized words, except for German. r=emilio
Pushed by
Avoid auto-hyphenating capitalized words, except for German. r=emilio,mats
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Assignee: nobody → jfkthame
Depends on: 1557291
Regressions: 1575513
You need to log in before you can comment on or make changes to this bug.