Urgent.News

What's breaking now, across thousands of outlets.

Tech

Por que texto estilizado vira quadradinho (tofu): fallback de fontes e Unicode

Você cola um nome em negrito cursivo no perfil, ele aparece perfeito no seu celular, e um amigo avisa que só vê uma fileira de quadradinhos. Nada está errado com o texto. O problema é que o aparelho dele não tinha como desenhar aqueles caracteres. Este post explica o porquê e mostra duas armadilhas de código que costumam aparecer junto. O que é o "tofu" O quadradinho vazio é chamado de tofu ,…

Original Portuguese Read in English

Characters that appear as empty squares, known as "tofu," occur when a font does not have a glyph for a certain character. It's not a character you type, but a rendering issue—the system couldn't find a matching glyph and instead displayed a substitute. The Noto font family from Google was specifically designed to address this problem.

Text styles, such as bold and italic, are not fonts themselves. Instead, they replace common letters with other Unicode characters that resemble the intended style. For example, "normal" is "Ghost," while "estilizado" is written as 𝓖𝓱𝓸𝓼𝓽. Even though the "estilizado" text appears more decorative, each character still occupies two units in UTF-16, which is why the .length property returns a higher number for the stylized text.

One common mistake is counting characters using .length, which can lead to discrepancies. For instance, the stylized text "𝓖𝓱𝓸𝓽" would be counted as 10 characters, while the normal text "Ghost" would be counted as 5. To avoid this issue, it's best to count characters using [...texto] or the Intl.Segmenter API in JavaScript.

Another issue arises when font fallbacks are not properly configured. If a browser can't find a matching font in the list specified in the font-family property, it may display tofu. To mitigate this problem, always end the font-family list with a generic family like sans-serif or system-ui. This ensures that the system can use a fallback font if the primary font doesn't support a particular character.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Designing a reverse proxy that survives a Plex SSRF

Designing a reverse proxy that survives a Plex SSRF Most guidance for CVE-2026-96655 ends at "upgrade to 1.43.3.10861". That is correct and sufficient for many owners.

  • Server-side request forgery in Plex mitigated using reverse proxy
  • Endpoint exploitation via /video/:/transcode/universal path parameter
  • Patching vulnerability is most comprehensive solution

Treating Safety as a Brake Is How Teams Fall Behind at Agent Speed

When software delivery accelerates, adding another approval before merge, another check before deployment, or a longer wait before release can feel like the responsible thing to do.

  • Treating safety as a brake slows down software delivery
  • Controls should be placed where risks originate, clearly defined, and timed carefully
  • Effective safeguards govern specific decisions, mitigate risk, and adapt to production data

Privacy Budgets for Email Verification

Email verification is often treated as a small feature: send a message, wait for a link, and mark the address as confirmed. In a real web application, it is also a data pipeline.

More from Friday 23 October →