proposal for new character 'soft/preferred line break'

Philippe Verdy verdy_p at wanadoo.fr
Mon Feb 10 01:13:05 CST 2014


2014-02-05 22:44 GMT+01:00 Rhavin Grobert <rhavin at shadowtec.de>:

> last mail was sent from wrong address, sorry, if u get id twice, answer to
> this one ;)
>
>
> Am 05.02.2014 17:22, schrieb Markus Scherer:
> > On Tue, Feb 4, 2014 at 2:25 PM, Rhavin Grobert <rhavin at shadowtec.de
> > <mailto:rhavin at shadowtec.de>> wrote:
> >
> >     Parallel to soft hyphen, a hyphen that is just inserted if the word
> >     was broken, it would be practical to have some way to tell browser:
> >     if you need to break the line, try here first. This would be really
> >     usefull for poems, music lines, adresses,...
> >
> >
> > That would be HTML <wbr> <http://dev.w3.org/html5/markup/wbr.html> or
> > U+200B ZERO WIDTH SPACE
> > <http://unicode.org/cldr/utility/character.jsp?a=200B>.
>
>
> No, you did not understand. <wbr> is like ­ its below the whitespace
> level: if the line is to long, it breaks a word:
>
> "This is a long line with a verylong<wbr>awesomeword in its middle."
>
> Wbr gives the opportunity to break at long|awesome. But what i mean is:
> - non existing "sbr" in parralell to shy assumed -
>
> "Do you think me gentle,<sbr/>do you think me cold?
> do you wanna risk a<sbr/>look into my thoughts?"
>
> if line is long enough:
>
> "Do you think me gentle, do you think me cold?
> do you wanna risk a look into my thoughts?"
>

The <wbr> is enough for this purpose,

A browser could even use them to give higher priority to break lines, than
on other breaking oppotunities (on whitespace or with some punctuation).
However I' not convinced this increased priority is a good thing if this
cannot be controled (the wbr element should then have an attribute to
control this priority, relatively to standard priorities of break
opportunities found in the plain text; it should also have attributes to
control how the break will be realized, such as inserting hyphens or not,
or another character, as it is not necessarily easy to deduce only from the
language tagging).

What you want is just to hint the line breaker in the renderer on where the
linebreaks are the best beneficial. This is really something that does not
belong to plain text, but to the presentation layer, and HTML for example
is reach enough about such presentation layer (that does not modify the
underlying plain text, so if you get the "innerText" property of an element
containing these tags, they are invisible and you'll onlywant to see the
plain text itself).

In my opinion the encced SHY character is there only for legacy reasons
(compatibility with older encodings when renderers had no good option to
break words. But in HTML SHY is not needed and <wbr> will work better.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://unicode.org/pipermail/unicode/attachments/20140210/1f12757a/attachment.html>


More information about the Unicode mailing list