Search This Blog

Thursday, September 23, 2021

[Ubunut] Firefox 字型顯示問題修正

Firefox 顯示Serif字型時,英文粗體會出現直線/豎線/pipeline,影響觀看


 以下列方式確認字型對應後,發現"Serif"會對應為"AR PL UMing TW" "Light"

$ fc-match serif
uming.ttc: "AR PL UMing TW" "Light"

修正方式如下:

建立~/.config/fontconfig/conf.d/50_priority.conf

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig> 
  <match target="pattern">
    <test name="family" qual="any">
      <string>serif</string>
    </test>
    <edit binding="strong" mode="prepend" name="family">
      <string>DejaVu Serif</string>
    </edit>
  </match>
</fontconfig>
 

 關閉Firefox再重開,即可修正Serif字型顯示問題

No comments: