Linear behavior of Unicode characters (e.g. πŸ¦„)?

Background

All of the following lines are one line, and you should see different behavior than the line

πŸ¦„ w / equals

=============================== πŸ¦„ ==================== ==================================================== =========================================

πŸ¦„ w / dots

.................................. πŸ¦„ ............... .................................................. .................................................. .................................................. .......................................

⚠️ w / both for reference

=============================== ⚠️ ==================== ==================================================== ==================================================== ==================================================== ================================================ =

.................................. ⚠️ ............... .................................................. .................................................. .................................................. .................................................. .................................................. .......

Questions:

  • Why does πŸ¦„ break the string (while ⚠️ doesn't)?
  • In Chrome 63 / Safari 11.0 why packing in "=" forces πŸ¦„ to stay on the top line, and in "." leads to the fact that πŸ¦„ is omitted in the second line?

JSFiddle :

div {
  width: 200px;
  display: block;
  ...
}
+4
1

. Equals Sign break Alphabetic, Unicorn Face Ideographic, Infix_Numeric.

UAX # 14: Unicode Line Breaking Algorithm, , , . , "" , . ⚠ , , , . πŸ¦„ , , , , .

, , : , . , :

, infix . .

, πŸ¦„, , , .

, . , , , . , Firefox πŸ¦„ , .

+3

Source: https://habr.com/ru/post/1693311/


All Articles