omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Tamil text shows as tofu boxes (no Tamil fallback in fontconfig, unlike Arabic)

Open mohammednafeel opened this issue 1 month ago • 1 comments

What happened

Tamil text renders as boxes (tofu) in Chromium whenever a page's Tamil web font does not load (offline, fonts blocked, or remote fonts disabled). Example: the title of https://youtu.be/S7qXvotU9Ig shows boxes, while Latin characters render fine.

Expected

Tamil text should render with Noto Sans Tamil (already installed) via system font fallback.

Steps to reproduce

  1. Fresh Omarchy 4.0.4 with Chromium and noto-fonts installed.
  2. Open a page with Tamil text whose web font fails to load. Easiest: open DevTools → Network → block fonts.gstatic.com, then load https://www.youtube.com/watch?v=S7qXvotU9Ig.
  3. The video title renders as tofu boxes.

Root cause

/etc/fonts/conf.d/50-omarchy.conf (owned by omarchy-settings) strongly binds sans-serif/Arial → Liberation Sans and appends Noto Naskh Arabic as a last-resort family, but there is no equivalent Tamil rule. As a result:

$ fc-match ':lang=ta'
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"      # has ZERO Tamil glyphs

$ fc-match 'family=Arial:charset=0baa'
NotoSansGrantha-Regular.ttf: "Noto Sans Grantha" "Regular"    # wrong script

Liberation Sans contains no Tamil glyphs, so Chromium paints tofu. Noto Sans Grantha also outranks Noto Sans Tamil for the codepoints the two fonts share (U+0BAA, U+0BB5, U+0BE6–U+0BF2).

Confirmed with the Chromium DevTools Protocol (CSS.getPlatformFontsForNode): with web fonts blocked, the title renders 97 glyphs in Liberation Sans (boxes) + 1 in Noto Sans Grantha.

Suggested fix

Add Tamil rules mirroring the existing Arabic block in default/fontconfig/conf.avail/50-omarchy.conf:

<!-- Prefer Noto Sans Tamil when a Tamil language is requested -->
<match target="pattern">
  <test name="lang" compare="contains"><string>ta</string></test>
  <edit name="family" mode="prepend" binding="strong"><string>Noto Sans Tamil</string></edit>
</match>

<!-- Chromium resolves missing glyphs one character at a time with no lang on
     the pattern, so append a last-resort family. Charset matching outranks
     family matching, so a font that does not cover the codepoint is never
     pulled in; Latin/monospace/emoji/CJK resolve as before. -->
<match target="pattern">
  <edit name="family" mode="append" binding="weak"><string>Noto Sans Tamil</string></edit>
</match>

I verified this locally (in ~/.config/fontconfig/conf.d/): :lang=ta and Arial:charset=0baa then resolve to Noto Sans Tamil, with no regressions for Latin, Arabic, CJK, Emoji, or Devanagari.

System

  • Omarchy 4.0.4-1 (stable), omarchy-settings 4.0.4-1
  • Chromium 152.0.7977.82-1
  • fontconfig 2:2.18.3-2, noto-fonts 1:2026.09.01-1
  • Intel i7-8850H / UHD Graphics 630 (CoffeeLake-H)

mohammednafeel avatar Oct 17 '26 02:10 mohammednafeel

Thanks for the detailed report. This is the same bug as #11002, which was opened earlier and is still open, so I am closing this one as its duplicate.

Both describe Tamil rendering as boxes in Chromium when it falls back to system fonts. Both trace it to the same place: default/fontconfig/conf.avail/50-omarchy.conf has a last-resort family for Arabic and none for Tamil. Both propose the same fix, an appended Noto Sans Tamil. #11002 was reproduced on a disposable Omarchy 4.0.4 worker with Chromium 152. That run reached the same Noto Sans Grantha finding you describe: Grantha also covers U+0BAA (ப) and wins the tie on font version, so a word containing ப is drawn as boxes.

Two open pull requests fix this: #11679, which closes #11002, and #15699, which closes this issue. They are reviewed as their own items, and which one lands is the maintainer's call. If this report covers something #11002 does not, reopen it and say what.

What was checked: this report against the open and closed issues and pull requests that touch fontconfig and font fallback, by reading. Nothing was run for this report, since #11002's reproduction already covers it. Claude Opus 5.5 read both reports, and Codex Medium, asked separately with only the two reports in front of it, agreed that they describe the same bug.

omarchybot avatar Oct 23 '26 01:10 omarchybot