容易自动换行的字符

发布于 2024-12-15 07:34:28 字数 1051 浏览 2 评论 0 原文

浏览器在调整大小时会自动自动换行文本,对吧? 除了正常空格之外,还有哪些字符可以被“分解”? 我知道软连字符和带有空格的零也可以做到这一点。但其他人呢?

例如

Lorem ipsum dolor sat amet,consectetur adipisicing elit,sed do eiusmod tempor incididunt ut laboure et dolore Magna aliqua。乌恩尼姆广告 Minim veniam,quis nostrud 实习 ullamco labis nisi ut aliquip ex ea commodo consequat。 Duis aute irure dolor 在 Reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla 帕里亚图尔。 Excceur sint occaecat cupidatat 非 Proident,sunt in culpa qui officia deserunt mollit anim id est labourum。

调整大小时:

Lorem ipsum dolor sit amet, consectetur
adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident,
sunt in culpa qui officia deserunt mollit
anim id est laborum.

Browsers, when resized, word-wrap text on the fly, right?
What characters beside normal spaces, allow to be "breaked" down?
I know soft hyphens and zero with spaces also do this. But what others?

e.g.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.

When resized:

Lorem ipsum dolor sit amet, consectetur
adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat. Duis aute irure
dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident,
sunt in culpa qui officia deserunt mollit
anim id est laborum.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

安静被遗忘 2024-12-22 07:34:28

以下内容摘自最新 W3C CSS3 草案中的换行和字边界部分:http://www.w3.org/TR/css3-text/#line-breaking

在大多数书写系统中,在没有连字的情况下,换行仅发生在单词边界处。许多书写系统使用空格或标点符号来明确分隔单词,并且可以通过这些字符来识别换行机会。然而,泰语、老挝语和高棉语等文字不使用空格或标点符号来分隔单词。尽管零宽度空格 (U+200B) 可以在这些脚本中用作显式单词分隔符,但这种做法并不常见。因此,需要词汇资源来正确识别此类文本中的断点。

在其他几种书写系统(包括中文、日文、彝文,有时还有韩文)中,换行机会基于字符边界,而不是单词边界。在这些系统中,除某些字符组合之间之外,行可以在任何地方断行。此外,这些限制的严格程度可能因排版风格而异。

The following is from the Line Breaking and Word Boundaries section in the latest W3C CSS3 Draft: http://www.w3.org/TR/css3-text/#line-breaking

In most writing systems, in the absence of hyphenation a line break occurs only at word boundaries. Many writing systems use spaces or punctuation to explicitly separate words, and line break opportunities can be identified by these characters. Scripts such as Thai, Lao, and Khmer, however, do not use spaces or punctuation to separate words. Although the zero width space (U+200B) can be used as an explicit word delimiter in these scripts, this practice is not common. As a result, a lexical resource is needed to correctly identify break points in such texts.

In several other writing systems, (including Chinese, Japanese, Yi, and sometimes also Korean) a line break opportunity is based on character boundaries, not word boundaries. In these systems a line can break anywhere except between certain character combinations. Additionally the level of strictness in these restrictions can vary with the typesetting style.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文