这是我现在在用的字体配置文件,将其放入/etc/fonts/local.conf
即可生效
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 <?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig > <match target ="font" > <edit name ="autohint" > <bool > true</bool > </edit > <edit name ="hintstyle" > <const > hintslight</const > </edit > <edit name ="antialias" > <bool > true</bool > </edit > </match > <match target ="pattern" > <edit name ="dpi" mode ="assign" > <double > 96</double > </edit > </match > <alias > <family > serif</family > <prefer > <family > Ubuntu</family > <family > WenQuanYi Micro Hei</family > <family > AR PL UMing CN</family > <family > AR PL ShanHeiSun Uni</family > <family > Bitstream Vera Serif</family > <family > DejaVu Serif</family > <family > AR PL UKai CN</family > <family > AR PL ZenKai Uni</family > </prefer > </alias > <alias > <family > sans-serif</family > <prefer > <family > Ubuntu</family > <family > WenQuanYi Micro Hei</family > <family > Bitstream Vera Sans</family > <family > DejaVu Sans</family > <family > WenQuanYi Zen Hei</family > <family > AR PL UMing CN</family > <family > AR PL ShanHeiSun Uni</family > <family > AR PL UKai CN</family > <family > AR PL ZenKai Uni</family > </prefer > </alias > <alias > <family > monospace</family > <prefer > <family > WenQuanYi Micro Hei Mono</family > <family > Bitstream Vera Sans Mono</family > <family > DejaVu Sans Mono</family > <family > WenQuanYi Zen Hei</family > <family > AR PL UMing CN</family > <family > AR PL ShanHeiSun Uni</family > <family > AR PL UKai CN</family > <family > AR PL ZenKai Uni</family > </prefer > </alias > <match target ="pattern" > <test qual ="any" name ="family" > <string > SimSun</string > </test > <edit name ="family" mode ="prepend" binding ="strong" > <string > Ubuntu</string > <string > WenQuanYi Micro Hei</string > </edit > <test qual ="any" name ="family" > <string > SimSun-18030</string > </test > <edit name ="family" mode ="prepend" binding ="strong" > <string > Ubuntu</string > <string > WenQuanYi Micro Hei</string > </edit > <test qual ="any" name ="family" > <string > AR PL ShanHeiSun Uni</string > </test > <edit name ="family" mode ="prepend" binding ="strong" > <string > Ubuntu</string > <string > WenQuanYi Micro Hei</string > </edit > <test qual ="any" name ="family" > <string > AR PL New Sung</string > </test > <edit name ="family" mode ="prepend" binding ="strong" > <string > Ubuntu</string > <string > WenQuanYi Micro Hei</string > </edit > <test qual ="any" name ="family" > <string > MingLiU</string > </test > <edit name ="family" mode ="prepend" binding ="strong" > <string > Ubuntu</string > <string > WenQuanYi Micro Hei</string > </edit > <test qual ="any" name ="family" > <string > PMingLiU</string > </test > <edit name ="family" mode ="prepend" binding ="strong" > <string > Ubuntu</string > <string > WenQuanYi Micro Hei</string > </edit > <test qual ="any" name ="family" > <string > sans</string > </test > <edit name ="family" mode ="prepend" binding ="strong" > <string > Ubuntu</string > <string > WenQuanYi Micro Hei</string > </edit > <test qual ="any" name ="family" > <string > sans-serif</string > </test > <edit name ="family" mode ="prepend" binding ="strong" > <string > Ubuntu</string > <string > WenQuanYi Micro Hei</string > </edit > </match > <match target ="font" > <test target ="pattern" name ="lang" compare ="contains" > <string > zh</string > </test > <test target ="pattern" name ="lang" compare ="contains" > <string > ja</string > </test > <test target ="pattern" name ="lang" compare ="contains" > <string > ko</string > </test > <edit name ="spacing" > <const > proportional</const > </edit > <edit name ="globaladvance" > <bool > false</bool > </edit > </match > <match target ="font" > <test name ="weight" compare ="less_eq" > <const > medium</const > </test > <test target ="pattern" name ="weight" compare ="more" > <const > medium</const > </test > <edit name ="embolden" mode ="assign" > <bool > true</bool > </edit > <edit name ="weight" mode ="assign" > <const > bold</const > </edit > </match > </fontconfig >