在 Debian 中“替换字体”通常有几种不同场景,下面按常见需求给你说明做法。
sudo apt update
sudo apt install fonts-wqy-zenhei # 文泉驿正黑
sudo apt install fonts-noto-cjk # Noto CJK
右键 → Preferences → 文本 → 自定义字体
fc-list
fc-match sans
新建文件:
sudo nano /etc/fonts/local.conf
内容示例:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="family"><string>Arial</string></test>
<edit name="family" mode="assign" binding="strong">
<string>Noto Sans CJK SC</string>
</edit>
</match>
</fontconfig>
fc-cache -fv
如果你是想用自定义字体文件覆盖系统字体:
sudo mv /usr/share/fonts/truetype/xxx.ttf /usr/share/fonts/truetype/xxx.ttf.bak
sudo cp myfont.ttf /usr/share/fonts/truetype/
sudo fc-cache -fv
fonts-wqy-zenhei、fonts-noto-cjkfonts-firacode、fonts-jetbrains-mono如果你能具体说一下:
我可以给你更精确的方案。