Re: [PATCH v2 0/2] docs/zh_CN: update translations for process/changes.rst and sphinx.rst

From: Jiandong Qiu

Date: Mon Jul 06 2026 - 10:10:21 EST


Hi Weijie,

I've been looking into the font rendering issue and have found
the root cause and a solution.

In the lore archive, the CSS defines `font-family: monospace`.
This instructs the browser to use the system's default monospace font.
On many Linux distributions, this default is Noto Sans Mono. The problem
is that Noto Sans Mono is a Latin-only font, so it lacks glyphs for Chinese
characters. When the browser encounters Chinese text, it falls back to
other fonts, causing inconsistent and often misaligned display.

The fix is to configure the system to prefer a monospace font that supports
both Latin and Chinese characters well, with a 2:1 width ratio for optimal
alignment. This can be done by adding a fontconfig rule to set the preferred
font for the monospace family.

Here's a commit that demonstrates exactly this configuration:

https://github.com/qiujiandong/dotfiles/commit/be193b3ec36a826b611d97920ff6afa76994aa7c

It creates an XML configuration file (e.g., ~/.config/fontconfig/fonts.conf)
with the following content:

```xml
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>monospace</family>
<prefer>
<family>Maple Mono NF CN</family>
</prefer>
</alias>
</fontconfig>
```

After adding this configuration, run `fc-cache -vf` to refresh the font cache.
Make sure the preferred font (in this example, Maple Mono NF CN) is installed.

After applying this change, the lore archive pages in the browser will use the
configured monospace font, displaying both English and Chinese text correctly.
This approach is generic and can be adapted to use any other suitable monospace
font that fits your preference.

Hope this helps!

Best regards,
Jiandong