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

RESOLVED FIXED in Firefox 68

Status

()

defect
P3
normal
RESOLVED FIXED
3 months ago
2 months ago

People

(Reporter: ragdoll, Assigned: jfkthame)

Tracking

66 Branch
mozilla68
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(1 attachment)

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.

[1] https://drafts.csswg.org/css-text-4/#hyphenation

Status: UNCONFIRMED → NEW
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 jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a811c910cfd3
Avoid auto-hyphenating capitalized words, except for German. r=emilio,mats
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Assignee: nobody → jfkthame
Depends on: 1557291
You need to log in before you can comment on or make changes to this bug.