答案1
这是 fontconfig 在我的计算机上提供的优先顺序:
$ fc-match -a | grep -i lohit
Lohit-Bengali.ttf: "Lohit Bengali" "Regular"
Lohit-Gujarati.ttf: "Lohit Gujarati" "Regular"
Lohit-Punjabi.ttf: "Lohit Punjabi" "Regular"
Lohit-Assamese.ttf: "Lohit Assamese" "Regular"
Lohit-Devanagari.ttf: "Lohit Devanagari" "Regular"
我添加了这个配置文件来提高阿萨姆语的优先级:
$ cat ~/.config/fontconfig/conf.d/90-prefer-assamese.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>Lohit Assamese</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Lohit Assamese</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Lohit Assamese</family>
</prefer>
</alias>
</fontconfig>
结果是:
$ fc-match -a | grep -i lohit
Lohit-Assamese.ttf: "Lohit Assamese" "Regular"
Lohit-Bengali.ttf: "Lohit Bengali" "Regular"
Lohit-Gujarati.ttf: "Lohit Gujarati" "Regular"
Lohit-Punjabi.ttf: "Lohit Punjabi" "Regular"
Lohit-Devanagari.ttf: "Lohit Devanagari" "Regular"