如何在Ubuntu16.04下面安裝字體

版权声明:copyright@Leon_CSDN https://blog.csdn.net/LeonSUST/article/details/82312964

今天在Ubuntu16.04下面安裝CAJViewer的時候 提示這樣的問題:

 deepin.net.cnki.cajviewer:i386 depends on fonts-adobe-source-han-serif-cn:all; however:
  Package fonts-adobe-source-han-serif-cn is not installed.

這是因爲系統缺少字體的原因 然後我就針對這個問題進行擴展 記錄一下如何在Ubuntu下面安裝我們需要的字體。

首先 我們應該回想到在windows 下面 我們會將下載好的字體install or copy到fonts的路徑下 在Ubuntu下面是類似的

我們在github上先找到們需要的字體 在這裏 我們缺少的是 fonts-adobe-source-han-serif-cn 所以 我們打開頁面 :https://github.com/adobe-fonts/source-han-serif
至於字體的鏈接 我們是可以搜到的 或者 你可以看這個鏈接的上一級目錄 是否有你想要的字體

确保 Branch 的旁边显示 release

然後 字體下載

我們先創建這個字體的目錄 (如果有了 就不用了)

sudo mkdir /usr/share/fonts/opentype

將文件clone到指定文件夾

sudo git clone https://github.com/adobe-fonts/source-han-serif.git /usr/share/fonts/opentype/shs

刷新字體緩存 rebuild the fonts cache

sudo fc-cache -f -v

到此爲止 我們的字體安裝就結束了 別的字體參考這個步驟

歡迎大家一起討論

這裏有github的參考鏈接 設計多操作系統 記錄下來 提供參考

https://github.com/adobe-fonts/source-han-serif/blob/release/README.md
對於我們只是用中文的 可以只下載我們需要的zip就行 這個鏈接做了詳細介紹 不贅述。

這裏還給出大家官方的安裝指南下載鏈接 僅供參考:

https://raw.githubusercontent.com/adobe-fonts/source-han-serif/release/download-guide-source-han.pdf
有四種語言的介紹

猜你喜欢

转载自blog.csdn.net/LeonSUST/article/details/82312964