centos下使用win中文字型解決方案

來源:互聯網
上載者:User

在linux下添加支援中文字型,中文字型的擷取可以從windows平台的字型庫中找到,windows下的C:\windows\fonts下面有你想要的字型,比如simsun.ttc<簡體中文>等字型。centos下的字型庫存放位置:/usr/share/fonts具體操作步驟:================================1.在/usr/share/fonts/chinese檔案夾下建立一個檔案夾(windows)[root@localhost~]#mkdir/usr/share/fonts/chinese/windows2.把從windows中找出的字型複製到windows檔案夾中,再為windows檔案夾更改許可權[root@localhost~]#chmod-R755/usr/share/fonts/chinese/windows3.在字型目錄<windows>中執行ttmkfdir命令[root@localhostwindows]#ttmkfdir-e/usr/share/X11/fonts/encodings/encodings.dir
4.更改fonts.conf檔案[root@localhost~]#vi/etc/fonts/fonts.conf然後添加如下一行;
/usr/share/fonts/chinese/windows添加位置如下:
<!--Fontdirectorylist-->
<dir>/usr/share/fonts/chinese/windows</dir>#新加內容
<dir>/usr/share/fonts</dir>5.重啟xfs伺服器[root@localhost~]#servicexfsrestart6.查看字型有沒有添加成功[root@localhost~]#fc-list:lang=zh-cn
新宋體,NSimSun:style=Regular
宋體,SimSun:style=Regular#字型添加成功
文鼎PL中楷Uni,ARPLZenKaiUni:style=Medium
文鼎PL細上海宋Uni,ARPLShanHeiSunUni,文鼎PL細上海宋Uni:style=Regular至此,在linux添加支援中文字型成功

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.