2013年8月21日 星期三

寫程式用字型

下載字型檔會開啟「字型檢視程式」,然後按「安裝」就可以使用。
或者放到 ~/.local/share/fonts/,執行 fc-cache -f -v。

Monaco (來自 Apple Inc.)
Consolas (來自 Microsoft)
  • 搜尋「Consolas.ttf」可以找到
設定
cp /etc/fonts/conf.d/69-language-selector-zh-tw.conf ~/.config/fontconfig/fonts.conf
vi ~/.config/fontconfig/fonts.conf # 修改 monospace 那段如下方
fc-cache -f -v
修改內容,只保留
 <?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <!-- Set fonts selection for zh-tw monospace -->
    <match target="pattern">
        <test qual="any" name="family">
            <string>monospace</string>
        </test>
        <test name="lang">
            <string>zh-tw</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>Monaco</string>
            <!--string>Microsoft JhengHei</string-->
        </edit>
    </match>
</fontconfig>

註:放字型的目錄
  • ~/.local/share/fonts/
  • /usr/share/fonts/
註:字型相關程式:fc-cache, fc-list 等

參考文章:
  1. Programmer 專用最佳字型 - Monaco font
  2. Monaco + LiHei 字型優化 on Ubuntu 10.04+
  3. Linux 安裝與使用
  4. 電腦漢字體
  5. Ubuntu 14.04 LTS 中文修正 (刪除不需要的設定檔,修改設定檔) 

沒有留言:

張貼留言

SIP header Via

所有 SIP 訊息 都要有 Via,縮寫 v。一開始的 UAC 和後續途經的每個 proxy 都會疊加一個 Via 放傳送的位址,依序作為回應的路徑。 格式 sent-protocol sent-by [ ;branch= branch ][ ; 參數 ...] s...