{
  "id": 16243733,
  "title": "Why styled text turns into a little square (tofu): font fallback and Unicode",
  "url": "https://urgent.news/2026/10/23/por-que-texto-estilizado-vira-quadradinho-tofu-fallback-de-fontes-e",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-23T23:21:09.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/johny_shapater_6c7b8494b4/por-que-texto-estilizado-vira-quadradinho-tofu-fallback-de-fontes-e-unicode-4m46"
  },
  "original_language": "pt",
  "account": "A article discusses the issue of text rendering on different devices, particularly when using stylized fonts. When a device cannot render a certain character, it is replaced with a blank square called \"tofu\". The article explains that stylized text generators do not install fonts, but rather use Unicode characters that appear as bold, italic, or gothic letters. However, these characters can cause issues with character counting and font rendering. The article provides two pitfalls to avoid: using \".length\" to count characters, which can lead to incorrect counts, and not having a fallback font, which can result in tofu appearing. It also provides tips for accessible text rendering, including using a generic font family and not relying on stylized text for important information.",
  "summary": "You paste a name in bold italics in the profile, it appears perfect on your cell phone, and a friend warns that he only sees a row of squares. Nothing is wrong with the text. The problem is that his device couldn't draw those characters. This post explains why and shows two code traps that usually appear together. What is tofu The empty square is called tofu,…",
  "key_points": [
    "Tofu characters appear when fonts lack specific glyphs",
    "Noto font family designed to prevent tofu rendering",
    "Stylized text uses Unicode characters occupying 2 UTF-16 units"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}