DEV Community

Cover image for How does Zalgo text work?
zalgotext
zalgotext

Posted on • Originally published at stackoverflow.com

How does Zalgo text work?

I've seen weirdly formatted text called Zalgo like below written on various forums. It's kind of annoying to look at, but it really bothers me because it undermines my notion of what a character is supposed to be. My understanding is that a character is supposed to move horizontally across a line and stay within a certain "container". Obviously the Zalgo text is moving vertically and doesn't seem to be restricted to any space.

https://zalgo.org/

The text uses combining characters, also known as combining marks.
n Unicode, character rendering does not use a simple character cell model where each glyph fits into a box with given height. Combining marks may be rendered above, below, or inside a base character

T̸̝̄͊̀͋͋̋̋̒̐̍̌̈́h̶̡̺̤̪͕̤̻̤͙̹̒͆͆̍͂̾̋́̐̆̿͠í̸̡̧̛̙̦̬̻̜̪̦̩̬̺̬̊̆͗̀̈̽̚̚ͅs̸̛̙͖͉̤̰̲̓̉̇̓̈̑̌̃̆̑͗̀ͅ ̵̡̯̯̪̒̍͐͋͘i̶̡̩̱͈̫̿̾̏s̸͚͑̒͑̑̄̿̉̅̄̈̌̈́̈́̃ ̷̧̭̼͙̹͍̗͔͂̎̒̈́͜Z̵̢̧̨̦̦̙̱͈̻̗̺̩̝̼̳͓̠̈́̅͆̾̊a̴͇͈̪̭̻̠̟̳͋̍̑̊̇̏̀̽̑̉͘̕͘͝͝͝l̴̙̖̱͔̜̅̀̂̐̒̕͘͝͝ͅḡ̷̡̢̢̧̛͎͖͙̫̻̠̪͍̜̟̣̝̟̓́́́̃͑͊̕ọ̵̺̟͎͇̎͋̎̾͌͌̊͜ ̵̡̢͓̖͎͓̜̣̩͉̬̩̘͌͛̍́͋͒̀̆ͅt̴̨̨̛̛͎̹̪͔̗͈̩̜̲̓͐͌̌̄́͆͐͋̓͠ͅę̵̢̧̡̩͍̦̭̺̖̤̜͆̈́̈͑̽͑̀̈̂͜ͅẍ̷̞͎̜̮̭̤͔̠͓̝͉̰́̎̀͑͑̏̿̋̈͌̎͗̕͜ţ̴̠̱̮̭̘͚̞͎͓̙̬̞̉͊̒́̕͝ͅ.̶̼̯̱̟̥̪͓̔̆͌̽̂͝

So you can easily construct a character sequence, consisting of a base character and “combining above” marks, of any length, to reach any desired visual height, assuming that the rendering software conforms to the Unicode rendering model. Such a sequence has no meaning of course, and even a monkey could produce it (e.g., given a keyboard with suitable driver).

Top comments (0)