DEV Community

Cover image for How Unicode Text Styling Actually Works (2026)
Iris Khan
Iris Khan

Posted on Edited on

How Unicode Text Styling Actually Works (2026)

Your bio "fonts" aren't fonts. They're just characters: weird, wonderful, off-the-map characters. Here's the technical story of how they work, why they sometimes turn into tofu boxes, and what every dev should know before using them.


I've been building Fonti (a little Unicode text styler) in public for a while now, and the number one question I get from developer friends is some version of: "Wait, how is this not just a font?"

Fair question. On the surface it looks like a font change. You paste 𝕙𝕖𝕝𝕝𝕠 into your bio and it renders "fancy." But no font was installed, no CSS was applied, nothing was styled at all. So what actually happened?

This is the article I wish someone had handed me when I started: the real mechanism, the failure modes, and the honest limitations, from one beginner dev to other devs.

The trick: it's not styling, it's substitution

Every character you see on screen is a code point: a number assigned by the Unicode standard. The letter h is U+0068. Normal stuff.

But Unicode also contains entire styled copies of the alphabet, originally designed for math notation. The big one is the Mathematical Alphanumeric Symbols block (U+1D400 – U+1D7FF). When a generator turns hello into 𝐑𝐞π₯π₯𝐨, it's doing plain substitution:

  • h (U+0068) β†’ 𝐑 (U+1D421, MATHEMATICAL BOLD SMALL H)
  • e (U+0065) β†’ 𝐞 (U+1D41E)
  • …and so on.

That's it. There's no formatting layer. The "style" is baked into which characters you picked. This is why it works everywhere text works, from Instagram bios and Discord usernames to tweets and plain <textarea> elements: those places render characters, and these are valid characters.

Try it: paste 𝐑𝐞π₯π₯𝐨 into any input, any app, any OS. It renders styled (if the glyph exists) without a single line of CSS.

Some copy-paste examples

Here's what the generator approach produces, all plain Unicode:

Bold: 𝐑𝐞π₯π₯𝐨 𝐰𝐨𝐫π₯𝐝
Italic: β„Žπ‘’π‘™π‘™π‘œ π‘€π‘œπ‘Ÿπ‘™π‘‘
Bold italic: 𝒉𝒆𝒍𝒍𝒐 π’˜π’π’“π’π’…
Script (cursive): 𝒽ℯ𝓁𝓁ℴ π“Œβ„΄π“‡π“π’Ή
Fraktur (gothic): π”₯𝔒𝔩𝔩𝔬 𝔴𝔬𝔯𝔩𝔑
Double-struck: 𝕙𝕖𝕝𝕝𝕠 𝕨𝕠𝕣𝕝𝕕
Monospace: πš‘πšŽπš•πš•πš˜ πš πš˜πš›πš•πš
Sans-serif bold: 𝗡𝗲𝗹𝗹𝗼 π˜„π—Όπ—Ώπ—Ήπ—±
Circled: β“—β“”β“›β“›β“ž β“¦β“žβ“‘β“›β““
Small caps (not really, but fun): Κœα΄‡ΚŸΚŸα΄ α΄‘α΄Κ€ΚŸα΄…

Notice how the "script" row mixes blocks. That's normal. Generators typically pull from several Unicode ranges and fall back to the closest match for letters that don't have a styled twin.

Why some glyphs turn into tofu boxes β–―

You've seen it: you paste a style somewhere and get β–―β–―β–―β–―β–― or blank squares. That box is called tofu, and the reason is simple: the user's font doesn't have a glyph for that code point.

Unicode assigns the number; fonts decide how (or whether) to draw it. The Mathematical Alphanumeric Symbols live at U+1D400+, which is in the supplementary planes, outside the Basic Multilingual Plane (U+0000–U+FFFF) that most legacy fonts cover. Common system fonts on iOS/Android/modern desktop cover them fine, but:

  • Older Windows fonts often don't include U+1D400–U+1D7FF.
  • Some platforms apply their own font stack to usernames/bios and won't do proper fallback.
  • A few apps actively strip non-BMP characters (see below).

So "works on my phone" β‰  "works everywhere." It's a font coverage problem, not a Unicode problem.

The part devs always ask about: surrogate pairs and string length

Here's where it bites in code. Characters above U+FFFF can't fit in one UTF-16 code unit, so UTF-16 (JavaScript strings, Java, .NET) encodes them as a surrogate pair: two code units per character.

Watch this:

"𝐑".length        // 2, not 1!
[..."𝐑"].length   // 1: the spread operator iterates code points
"𝐑𝐞π₯π₯𝐨".length   // 10, not 5
Enter fullscreen mode Exit fullscreen mode

Five visible "letters," ten UTF-16 code units. This is why:

  • Character limits break. A platform counting with .length sees "hello" styled as 10 characters. Twitter/X bio limits, Discord's username length checks, database VARCHAR(30) columns. They all count code units, not glyphs. A 75-char display name can blow past a 32-char limit while looking half the size.
  • Slicing breaks. "𝐑𝐞π₯π₯𝐨".slice(0, 3) gives you 𝐑 + half of 𝐞: a dangling surrogate, which renders as οΏ½ (U+FFFD, the replacement character).
  • Emojis have the same problem, for the same reason. If your validation already handles emoji correctly (code-point-aware), styled text mostly behaves.

Rule of thumb: whenever you measure, slice, or validate user text, count code points ([...str].length, Python's len() on a str, etc.), not code units.

Why some platforms strip or reject styled text

A few reasons you'll hit in the wild:

  1. Normalization. Some backends run input through NFC normalization. Most math-alphanumeric chars survive it, but combining-mark-based styles (z͟a͟l͟g͟o͟ text, diacritic stacks) get mangled.
  2. Character filters. Games and chat apps often allowlist printable ASCII + a few scripts. Anything else gets replaced or rejected. This is why a style works on TikTok but fails in a game's username field.
  3. Rendering pipelines. Discord, for instance, renders usernames in specific fonts in some UI spots; coverage varies between desktop, mobile, and web.
  4. Spam heuristics. Heavy zalgo/combining text can trip abuse filters. Another reason to keep it clean.

If you're building anything that accepts display names, the pragmatic approach is: allow the full range, count code points, and set generous limits.

Honest limitations (the part most generators won't tell you)

  1. Screen readers. A screen reader doesn't read 𝐑𝐞π₯π₯𝐨 as "hello." Many announce it as "mathematical bold small h, mathematical bold small e…", letter by letter, with the style prefix. An entire styled bio can be an awful experience for blind users. Use styled text sparingly, never for essential info.
  2. Search and Ctrl+F. Searching a page for "hello" will not match 𝐑𝐞π₯π₯𝐨. Different code points, no match. Same reason Google treats them as distinct strings.
  3. It's not a font. You can't change weight, size, or color beyond the fixed variants Unicode provides. There's no "bold script Fraktur with serifs." The set is closed, and new styled alphabets basically never get added (Unicode's policy is now not to encode more styled Latin letters).
  4. Copy-paste fidelity. Pasting between apps with different font coverage can silently turn characters into tofu or question marks on the receiving end.
  5. Readability. Fraktur and double-struck look cool and are genuinely hard to read. Long paragraphs in styled text are a readability tax on everyone.

None of this means "don't use it." It means use it like seasoning, not the whole meal.

FAQ

Are styled Unicode characters the same as fonts?
No. Fonts change how a character looks. Styled Unicode swaps in different characters that happen to look styled. The style travels with the text because it is the text.

Why does my styled name show as boxes on some devices?
The device's fonts lack glyphs for those code points (usually U+1D400+). It's a font-coverage issue on the rendering side. The characters themselves are fine.

Do styled characters count as one character or two?
One code point, but two UTF-16 code units (a surrogate pair). "𝐑".length === 2 in JavaScript. Count code points, not code units, when validating input.

Will styled text work in every app?
Mostly, but not always. Some games and platforms filter non-standard characters, and font coverage varies. Test the specific style on the specific platform before committing to it.

Is using styled Unicode in a bio "hacking"?
No, it's just Unicode. Platforms render what you paste. Some platforms filter it, which is their right, but there's nothing exploit-like about pasting valid characters.

Can I make my own styled alphabet?
Not really. You can't add code points to Unicode. What generators do is map existing styled characters onto ASCII input. You can build your own mapping tables (that's literally how these tools work), combining different blocks creatively.

Does styled text hurt SEO or accessibility?
For SEO: search engines see distinct code points, so styled keywords don't match plain-text queries. For accessibility: screen readers often spell out the style names letter by letter, which is rough. Keep styled text decorative and short.

Why do some letters look "missing" in certain styles?
Unicode never encoded styled versions of every letter in every style. Generators substitute the closest available character or leave the plain letter. For example, there's no dedicated "script capital" for every letter, so mappings get creative.

Related Guides

If you want to play with the actual styles after understanding the machinery, a couple of practical roundups I put together: Best Fonts for Instagram Bio 2026 (30 copy-paste styles, tested), Aesthetic Text Styles 2026 (vibe-organized, from coquette to dark academia), and for the gamers, Gaming Name Fonts (what actually survives game username filters). Also worth a look: TikTok bio fonts guide, Discord name fonts guide, WhatsApp text formatting guide, and Fancy text generators, under the hood. Gaming name fonts guide


By Iris Khan, beginner web dev, writing the build in public.


Go deeper: The Hidden Price of Fancy Text: What Those Curly Bio Letters Actually Cost You covers what styled text does to your character limits, search visibility, and screen readers, with the receipts from the Unicode standard itself.

Top comments (0)