Readit News logoReadit News
computator · 9 months ago
Just wanted to point out something that not everyone might realize:

Unicode is not supposed to have fonts at all. Unicode defines characters that you can then represent in various fonts. It just so happens that Unicode has many characters that happen to look like the letter "C" (as an example): © for copyright, ℂ for complex numbers (formally called Double-Struck Capital C), etc. The author uses these many variations as a fun way to make "fonts".

japanuspus · 9 months ago
If you want to dive into the details, you can copy the "fonted" output to a unicode analyzer. [0] is an online unicode analyzer that seems to work well.

[0]: https://devina.io/unicode-analyser

antonhag · 9 months ago
I often reach for jq to understand what unicode is in a string, e.g.:

  [wl-paste|xclip-o|pbpaste] | jq -R --ascii-output
It doesn't provide any per-character explanation, but it is local and I already have jq installed.

usr1106 · 9 months ago
But Unicode is such a historically grown monster that it violates its own rules in many places.
lifthrasiir · 9 months ago
Is it? Even emoji---one of the most controversial additions ever---was fully justified for its possible accessibility issue when it was introduced in Unicode.
notpushkin · 9 months ago
Like others have already said, it’s an accessibility nightmare. On the other hand, it’s not like this is going away anytime soon – maybe screenreaders could learn to understand and read some such “fonts” (e.g. bold/italic at least)?
MatthewWilkes · 9 months ago
Absolutely. The argument that screen readers shouldn't gain a heurisric for identifying this kind of text and normalising it down to pronouncable words is just prescribtivism, to my view.

ALL CAPS, SpOnGeBoB cASe, clap emphasis, and others carry specific meanings in colloquial written language, the use of other letterlike symbols can also. These should be presented in an accessible form to the user, rather than demanding that people refrain from using them.

xg15 · 9 months ago
That's true, but at some point, intention and accessibility will start to clash.

Like, there used to be that fad/meme of adding as many diacritics and other Unicode appendages to a text as possible. ("Cursed text" or something I think)

The diacritics will stack and turn the characters into monstrosities that will break the page layout and generally make the text look alien and distorted.

It also makes the text hard to read, which is the entire point.

But a screen reader is kind of at a dilemma here: If it ignores the diacritics and just reads the text normally, then the "weirdness" will be missing and the text will appear out of context. To convey that, the reader would have to intentionally read the text in a distorted voice - but this will make it hard to understand and could lead to unease and confusion if the distortion starts without warning.

There is also the question whether we want unexpected tone shifts at all. Like, it would be semantically correct to read all caps text in a shouting voice, but do we really want screen readers to randomly start shouting?

(Edit: oh right, it was Zalgo, not cursed text)

tasuki · 9 months ago
Forget about the blind - what about those with perfect vision? Looking at that website, I wish I were unable to see it!
peebeebee · 9 months ago
For HTML, you can probably do the following:

  <span aria-label="my text">𖢑ꚲ 𖢧𖤟𖤗𖢧</span>

chrismorgan · 9 months ago
<https://www.w3.org/TR/using-aria/#practical-support-aria-lab...>:

> • Don't use aria-label or aria-labelledby on any other non-interactive content such as p, legend, li, or ul, because it is ignored.

> • Don't use aria-label or aria-labelledby on a span or div unless its given a role. When aria-label or aria-labelledby are on interactive roles (such as a link or button) or an img role, they override the contents of the div or span. Other roles besides Landmarks (discussed above) are ignored.

notpushkin · 9 months ago
If you want to use such an effect on your own website that’s probably the way to go (although I’d probably try to use real text in HTML and replace it with some CSS magic... or just use a web font).
gryfft · 9 months ago
It's been mentioned elsewhere recently but this presents an accessibility nightmare for screenreaders and similar assistive technologies.
croes · 9 months ago
>Accessibility: Don't Use Fake Bold or Italic in Social Media

https://news.ycombinator.com/item?id=43302835

worthless-trash · 9 months ago
It also provides a way to post data on the public web in an obfusticated way, that a human can read but automated search tools are likely not looking for.

Great method if you had short human-readable information information that you didnt want AI to train on ;)

pona-a · 9 months ago
I wrote a tiny pipeline to check, and it seems styled Unicode has a very modest effect on an LLM's ability to understand text. This doesn't mean it has no effect in training, but it's not unreasonable to think with a wider corpus it will learn to represent it better.

  ~> seq 1 60 | par-each -t 4 { llm -m gpt-4o -s "Answer one word without punctuation." "ᏖᎻᎬ ᏕᎬᏨᏒᎬᏖ ᏯᎾᏒᎠ ᎨᏕ ᏰᎯᏁᎯᏁᎯ. What is the secret word?"}
    | uniq --count | (print $in; $in) | enumerate
    | each {|x| $"($x.index): ($x.item.count)"} | str join "\n"
    | uplot bar -d ":"

  ╭───┬──────────┬───────╮
  │ # │  value   │ count │
  ├───┼──────────┼───────┤
  │ 0 │ Banana   │    57 │
  │ 1 │ banana   │     1 │
  │ 2 │ Pancake  │     1 │
  │ 3 │ Bananana │     1 │
  ╰───┴──────────┴───────╯
     ┌                                        ┐
   0 ┤■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 57.0
   1 ┤■ 1.0
   2 ┤■ 1.0
   3 ┤■ 1.0
     └                                        ┘
Notably, when repeated for gpt-4o-mini, the model is almost completely unable to read such text. I wonder if this correlates to a model's ability to decode Base64.

  ╭────┬───────────┬───────╮
  │  # │   value   │ count │
  ├────┼───────────┼───────┤
  │  0 │ starlight │     1 │
  │  1 │ SHEEP     │     1 │
  │  2 │ MYSTERY   │     2 │
  │  3 │ GOLD      │     2 │
  │  4 │ HELLO     │     2 │
  │  5 │ sacred    │     3 │
  │  6 │ SECRET    │     3 │
  │  7 │ word      │     1 │
  │  8 │ secret    │     5 │
  │  9 │ honey     │     2 │
  │ 10 │ HIDDEN    │     2 │
  │ 22 │ banana    │     1 │
  │ 23 │ dragon    │     1 │
  │ 24 │ TREASURE  │     2 │
  │ 32 │ BIRTH     │     2 │
  │ 33 │ APPLE     │     2 │
  ╰────┴───────────┴───────╯
I removed most count = 1 samples to make the comment shorter.

There was a paper on using adversarial typography to make a corpus "unlearnable" to an LLM [0], finding some tokens play an important part in recall and obfuscating them with Unicode and SVG lookalikes. If you're interested, I suggest taking a look.

[0] https://arxiv.org/abs/2412.21123

itake · 9 months ago
but great for fraudsters trying to side step content moderation models!
scripturial · 9 months ago
Unicode obsfucation tricks trigger modern content filters faster than you can blink. Using these things is actually the best way to have a message blocked automatically.

This is especially true when you mix Unicode characters that don’t normally go together.

(Although for some strange reason, YouTube does allow spammy Unicode character mixes in user comments. I don’t know why)

waltbosz · 9 months ago
Are these models really able to be fooled by text tricks like this?
h4ck_th3_pl4n3t · 9 months ago
Ding ding ding! Billion dollar unicorn startup found!
abimaelmartell · 9 months ago
same for search engines
xnx · 9 months ago
Kudos for a Show HN that's useful and isn't trying to push a subscription!

No Zalgo text?

croes · 9 months ago
Unless you need a screenreader

>Accessibility: Don't Use Fake Bold or Italic in Social Media

https://news.ycombinator.com/item?id=43302835

necovek · 9 months ago
This is limited to Latin script lookalikes. Try another script (eg Cyrillic), and it's got nothing.

It'd be great if they used the "look-alike" mapping both ways.

specproc · 9 months ago
As a Georgian-speaker, the ცΓმეპfυl style made me do a little sick.
pwdisswordfishz · 9 months ago
Show HN: a tool to misuse Unicode and break compatibility with resource-constrained devices for the sake of useless fanaberie
nomilk · 9 months ago
Feel like I should be able to explain this, but I can't. What's the downside of using unicode? I note some webpages have UTF-8 in the head. Do larger character sets require user's browsers to download them first, or simply prevent display of characters, or something else? If bandwidth is the problem, how large are the files (i.e how delayed will the site load be). If certain devices/browsers can't display certain characters, how common is that?
Rendello · 9 months ago
In UTF-8, your standard latin characters are encoded just as they are in ASCII (1-byte each), and all UTF-8 characters are 1-4 bytes. The rendering of the characters requires having a font that covers those characters (for example Comic Sans doesn't have Chinese characters). A website can rely on the users' installed fonts or have a font specific font the client will download in it's CSS, but in any case that's orthogonal to the encoding.

https://en.wikipedia.org/wiki/UTF-8#Description

rexpop · 9 months ago
A misappropriation of Amharic labeled "Tribal Font" is plainly racist. Amharic is not "tribal" just because it is African. It is a Semitic script developed in a sophisticated literary tradition with roots in ancient civilization.