-
Notifications
You must be signed in to change notification settings - Fork 29k
Description
Latest update: #18761 (comment)
Internal: b/137284394
Here (#4478) Hixie commented:
"Ok the plan is that rather than truncating individual characters until it fit, we will truncate entire atomic positioned glyph sequences (e.g. whole ligatures or shaped words) until the ellipsis fits. That would have the advantage of being much more performant. It would have the disadvantage of truncating the entire word if the whole line was one ligature (e.g. if your line was the word "Zapfino" in the Zapfino font, and it overflowed at the "o", we would replace the whole thing with a "...", rather than just the "no".)"
Although the above comment talks about ligatures, it seems to me this is being ignored, and whole words are simply being removed.
Now suppose the text "Laboris nisi ut aliquip ex ea commodo"
gets cut right before word "ex"
. Since the previous word fits, it may cut some letters of that last word to fit the ellipsis, resulting in:
"Laboris nisi ut aliqu..."
However, if the horizontal space is a litter smaller, than the letter "p"
from "aliquip"
won't fit, and it will cut the whole word, resulting in:
"Laboris nisi ut ... "
But that's not how overflow works for other platforms, and it makes no sense to remove whole words. The obvious result, if "p" doesn't fit should be, just as before:
"Laboris nisi ut aliqu..."
As things are now, we tend to see a lot of words cut in their last 1 or 2 chars, and a lot of words completely removed, leaving a lot of weird white space. That gets particularly nasty in one line texts like titles.
Please, don't create weird behaviors for things with time-honored traditions like ellipsizing. Stick to what everybody else does. If you want, let the devs choose between both behaviors: enum TestOverflow {clip, fade, ellipsisWords, ellipsisLetters}
.
If Arabic and other eastern languages have problems with that (as per issue 4478), you can even do some autodetection for characters of those languages, by adding the enum TestOverflow.ellipsisAutodetect
.