Linux裡的字型設定問題

來源:互聯網
上載者:User

Linux裡的字型設定問題

用linux作案頭運用對於中文使用者來說最主要的是字型和IME,我在這裡介紹一下我的設定。
IME就用scim,有很多朋友在起初可能無法喚出IME,這是由於local的編碼設定不對,設成UTF-8一般就沒問題了。

字型就可以藉助windows下的字型檔在:C:/windows/fonts檔案夾下有simsun.ttc的檔案,把它考到/usr/share/fonts/truetype/freefont下,改名為simsun.ttf

這裡你可以多考一些truetype的字型,但這個字型看起來就很舒服了。

然後啟動一個shell,運行fc-cache -fv

再編輯/etc/fonts/fonts.conf
在最後</fontconfig>之前加上
<match target="font">
<test name="family"><string>Vera Sans YuanTi</string></test>
<edit name="globaladvance"><bool>false</bool></edit>
</match>

<match target="font">
<test name="family"><string>Vera Sans YuanTi Mono</string></test>
<edit name="globaladvance"><bool>false</bool></edit>
</match>

<match target="font">
<edit name="antialias"><bool>true</bool></edit>
<edit name="hinting"><bool>false</bool></edit>
<edit name="autohint"><bool>false</bool></edit>
</match>

<match target="font">
<test name="pixelsize" compare="more_eq"><double>12</double></test>
<test name="pixelsize" compare="less_eq"><double>16</double></test>
<edit name="antialias"><bool>false</bool></edit>
<edit name="hinting"><bool>true</bool></edit>
<edit name="autohint"><bool>false</bool></edit>
</match>

這以後就會把字型變成windows那樣細細的感覺。
加上:
<match target="font">
<test name="family"><string>Vera Sans YuanTi</string></test>
<edit name="globaladvance"><bool>false</bool></edit>
</match>

<match target="font">
<test name="family"><string>Vera Sans YuanTi Mono</string></test>
<edit name="globaladvance"><bool>false</bool></edit>
</match>

<match target="font">
<edit name="antialias"><bool>true</bool></edit>
<edit name="hinting"><bool>false</bool></edit>
<edit name="autohint"><bool>false</bool></edit>
</match>
就會把字型變成mac os 那樣粗粗的感覺。

但是不要兩個都加。

通過以上設定應該說字型上已經很好了。這個小文只是給新手們一點參考,讓朋友們少走些彎路,避免想用linux的朋友不至於因為字型問題又回到windows下。

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.