[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

在中文(zh_CN.UTF-8)环境下 Chromium Browser/Google Chrome 等宽字体显示为非衬线字体



大家好,

最近我在使用 Debian 时,遇到在中文(zh_CN.UTF-8)环境下 Chromium Browser/Google Chrome
等宽字体会被非衬线字体替代的问题。

全新安装的 Debian Buster (Gnome 桌面环境),默认配置,并通过 apt 将软件包更新到最新。

如果语言为 zh_CN.UTF-8,Chromium Browser/Google Chrome 在访问部分含有等宽字体的页面(例如
https://github.com/openwrt/mt76/blob/master/eeprom.c)时,会显示为一种非衬线字体,如下图所示:;

https://imgur.com/a/fbVKmvi

如果语言为 en_US.UTF-8,Chromium Browser/Google Chrome 正确展示等宽字体,如下图所示:

https://imgur.com/a/hu4cxcv

以下是一些其他可能有关的信息

LANG=en_US.UTF-8 LANGUAGE= fc-match mono
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"

LANG=zh_CN.UTF-8 LANGUAGE= fc-match mono
NotoSansCJK-Regular.ttc: "Noto Sans Mono CJK SC" "Regular"

LANG=en_US.UTF-8 LANGUAGE= fc-match
'SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace'
DejaVuSans.ttf: "DejaVu Sans" "Book"

LANG=zh_CN.UTF-8 LANGUAGE= fc-match
'SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace'
NotoSansCJK-Regular.ttc: "Noto Sans CJK SC" "Regular"

dpkg -l | grep fonts- | cut -d " " -f 3
fonts-arabeyes
fonts-arphic-ukai
fonts-arphic-uming
fonts-beng
fonts-beng-extra
fonts-bpg-georgian
fonts-cantarell
fonts-dejavu
fonts-dejavu-core
fonts-dejavu-extra
fonts-deva
fonts-deva-extra
fonts-droid-fallback
fonts-dzongkha
fonts-farsiweb
fonts-freefont-ttf
fonts-gargi
fonts-gujr
fonts-gujr-extra
fonts-guru
fonts-guru-extra
fonts-hosny-amiri
fonts-hosny-thabit
fonts-ipafont
fonts-ipafont-gothic
fonts-ipafont-mincho
fonts-kacst
fonts-kacst-one
fonts-kalapi
fonts-khmeros
fonts-liberation
fonts-liberation2
fonts-lohit-beng-assamese
fonts-lohit-beng-bengali
fonts-lohit-deva
fonts-lohit-gujr
fonts-lohit-guru
fonts-lohit-knda
fonts-lohit-mlym
fonts-lohit-taml
fonts-lohit-taml-classical
fonts-lohit-telu
fonts-mlym
fonts-nakula
fonts-nanum
fonts-nanum-coding
fonts-noto
fonts-noto-cjk
fonts-noto-cjk-extra
fonts-noto-color-emoji
fonts-noto-core
fonts-noto-extra
fonts-noto-hinted
fonts-noto-mono
fonts-noto-ui-core
fonts-noto-ui-extra
fonts-noto-unhinted
fonts-opensymbol
fonts-quicksand
fonts-sahadeva
fonts-samyak-deva
fonts-samyak-gujr
fonts-samyak-mlym
fonts-samyak-taml
fonts-sarai
fonts-sil-abyssinica
fonts-sil-andika
fonts-sil-scheherazade
fonts-sipa-arundina
fonts-smc
fonts-smc-anjalioldlipi
fonts-smc-chilanka
fonts-smc-dyuthi
fonts-smc-karumbi
fonts-smc-keraleeyam
fonts-smc-manjari
fonts-smc-meera
fonts-smc-rachana
fonts-smc-raghumalayalamsans
fonts-smc-suruma
fonts-smc-uroob
fonts-taml
fonts-telu
fonts-telu-extra
fonts-thai-tlwg
fonts-tlwg-garuda
fonts-tlwg-garuda-ttf
fonts-tlwg-kinnari
fonts-tlwg-kinnari-ttf
fonts-tlwg-laksaman
fonts-tlwg-laksaman-ttf
fonts-tlwg-loma
fonts-tlwg-loma-ttf
fonts-tlwg-mono
fonts-tlwg-mono-ttf
fonts-tlwg-norasi
fonts-tlwg-norasi-ttf
fonts-tlwg-purisa
fonts-tlwg-purisa-ttf
fonts-tlwg-sawasdee
fonts-tlwg-sawasdee-ttf
fonts-tlwg-typewriter
fonts-tlwg-typewriter-ttf
fonts-tlwg-typist
fonts-tlwg-typist-ttf
fonts-tlwg-typo
fonts-tlwg-typo-ttf
fonts-tlwg-umpush
fonts-tlwg-umpush-ttf
fonts-tlwg-waree
fonts-tlwg-waree-ttf
fonts-ukij-uyghur
fonts-unikurdweb
fonts-vlgothic
fonts-yrsa-rasa
gsfonts-x11
xfonts-100dpi
xfonts-75dpi
xfonts-base
xfonts-encodings
xfonts-scalable
xfonts-thai
xfonts-thai-etl
xfonts-thai-manop
xfonts-thai-nectec
xfonts-thai-poonlap
xfonts-thai-vor
xfonts-unifont
xfonts-utils

在中文环境下,fc-match 在查询 'SFMono-Regular,Consolas,Liberation
Mono,Menlo,monospace' 时错误地报告了一个非衬线字体"Noto Sans CJK SC",这有没有可能是一个
fontconfig 的问题?谁能给我点提示以找到问题所在?


Reply to: