阿萨姆语字体在 ubuntu 14 或 16 中显示不正确

阿萨姆语字体在 ubuntu 14 或 16 中显示不正确

Chrome 和 Firefox 中的字体assamese显示不正确。我认为它将其视为孟加拉语。

这是错误字体的示例:

在此处输入图片描述

这是正确字体的示例:

在此处输入图片描述

答案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"

相关内容