[問題] Ubuntu 思源黑體設定問題

看板Linux作者 (海海海)時間9年前 (2016/03/18 12:13), 9年前編輯推噓7(7023)
留言30則, 5人參與, 最新討論串1/1
請問要怎麼讓全部的使用者都使用思源黑體呢? 我的字體是放在 /usr/share/fonts/noto/ 內 我只要在 /etc/fonts/conf.d/69-language-selector-zh-tw.conf 內加入 Noto Sans CJK TC, 在登入畫面的中文就會變成方框,但如果是在家目錄內的 .fonts.conf 就可以成功設定, 只是就變成只有單一使用者可以使用了。 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 122.117.207.31 ※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1458274429.A.007.html

03/18 12:15, , 1F
字型檔的user是?有些軟體只要不是root:root就不會正確
03/18 12:15, 1F

03/18 12:15, , 2F
運作
03/18 12:15, 2F

03/18 12:48, , 3F
把你的 .fonts.conf 複製成 /etc/fonts/local.conf
03/18 12:48, 3F

03/18 13:24, , 4F
照 mmis1000 說的把字體的 user 和 group 改成 root
03/18 13:24, 4F

03/18 13:25, , 5F
結果會全變成框框
03/18 13:25, 5F

03/18 13:25, , 6F
照 Bencrie 的做還是一樣只有我的使用者可以用耶,
03/18 13:25, 6F

03/18 13:25, , 7F
其他全都變成方框
03/18 13:25, 7F
目前的狀況是: | /usr/share/fonts/noto/* | /etc/fonts/local.conf | 結果 ---------------------------------------------------------------------------- 1. | user:root,group:root | user:root,group:root | 全部變成方框 2. | user:我,group:我 | user:root,group:root | 自己能用,其他都是方框 ※ 編輯: s9209122222 (122.117.207.31), 03/18/2016 13:36:45

03/18 14:01, , 8F
其它使用者的home也各放一份conf?
03/18 14:01, 8F

03/18 14:08, , 9F
你有改 sans-serif 的 fallback 清單?
03/18 14:08, 9F
我照您說的把原本的 .conf/fontconfig/fonts.conf 給移動到 /etc/fonts/local.conf 以下是我 /etc/fonts/local.conf 的內容: <fontconfig> <match target="pattern"> <test qual="any" name="family"> <string>serif</string> </test> <edit name="family" mode="prepend" binding="strong"> <string>Noto Sans CJK TC</string> <string>Noto Sans CJK SC</string> <string>Noto Sans CJK JP</string> <string>Noto Sans CJK KR</string> </edit> </match> <match target="pattern"> <test qual="any" name="family"> <string>sans-serif</string> </test> <edit name="family" mode="prepend" binding="strong"> <string>Noto Sans CJK TC</string> <string>Noto Sans CJK SC</string> <string>Noto Sans CJK JP</string> <string>Noto Sans CJK KR</string> </edit> </match> <match target="pattern"> <test qual="any" name="family"> <string>monospace</string> </test> <edit name="family" mode="prepend" binding="strong"> <string>Noto Sans CJK TC</string> <string>Noto Sans CJK SC</string> <string>Noto Sans CJK JP</string> <string>Noto Sans CJK KR</string> </edit> </match> <match target="font"> <edit name="hinting" mode="assign"> <bool>false</bool> </edit> <edit name="autohint" mode="assign"> <bool>false</bool> </edit> <edit name="hintstyle" mode="assign"> <const>hintnone</const> </edit> </match> </fontconfig> ※ 編輯: s9209122222 (122.117.207.31), 03/18/2016 14:17:27

03/18 14:25, , 10F
prepend 改成 append 看看
03/18 14:25, 10F

03/18 14:27, , 11F
或者用 fc-match -a sans-serif 檢查看看結果
03/18 14:27, 11F

03/18 14:28, , 12F
那個是什麼?
03/18 14:28, 12F
fc-match -a sans-serif|grep "Noto Sans CJK TC" 後的結果: NotoSansCJKtc-Medium.otf: "Noto Sans CJK TC" "Medium" NotoSansCJKtc-DemiLight.otf: "Noto Sans CJK TC" "DemiLight" NotoSansCJKtc-Regular.otf: "Noto Sans CJK TC" "Regular" NotoSansCJKtc-Light.otf: "Noto Sans CJK TC" "Light" NotoSansCJKtc-Thin.otf: "Noto Sans CJK TC" "Thin" NotoSansCJKtc-Bold.otf: "Noto Sans CJK TC" "Bold" NotoSansCJKtc-Black.otf: "Noto Sans CJK TC" "Black" ※ 編輯: s9209122222 (122.117.207.31), 03/18/2016 14:35:06

03/18 14:40, , 13F
呃 ... 你這樣 grep 有意義嗎 orz
03/18 14:40, 13F

03/18 14:41, , 14F
fc-match 查取 glyph 的優先順序
03/18 14:41, 14F

03/18 14:51, , 15F
請問那是?我剛剛看了一下全部,最開頭是這幾個
03/18 14:51, 15F

03/18 15:05, , 16F
還是說這是 Ubuntu 的 BUG?
03/18 15:05, 16F

03/18 15:14, , 17F
不然就找看看 fonts.conf 到底有沒有 include local.conf
03/18 15:14, 17F

03/18 15:16, , 18F
抱歉,我耍笨了,我字體權限是 640,調到 644 就好了
03/18 15:16, 18F

03/18 19:37, , 19F
package裡就有noto cjk了,不用自己裝了
03/18 19:37, 19F

03/18 19:38, , 20F
要套用就動一下69 zh tw
03/18 19:38, 20F

03/18 21:52, , 21F
試用了 69 zh tw 那個之後發現有些字體不會套用思源
03/18 21:52, 21F

03/18 21:52, , 22F
黑體,譬如 Firefox 某些網頁的聊天室
03/18 21:52, 22F

03/18 21:53, , 23F
還是要用 local.conf 來解決
03/18 21:53, 23F

03/18 21:54, , 24F
Ubuntu 官方的 noto cjk 好像很舊?
03/18 21:54, 24F

03/19 13:45, , 25F
沒有套的應該有更後面的設定檔,比如99
03/19 13:45, 25F

03/19 13:46, , 26F
新版本好像主要差在粗細
03/19 13:46, 26F

03/19 13:54, , 27F
如果和 openSUSE 他們用的版本一樣的話,那我看到的
03/19 13:54, 27F

03/19 13:56, , 28F
差別是舊版在有些字的顯示上有問題,譬如部首的手部
03/19 13:56, 28F

03/19 13:56, , 29F
在左邊的末端會拖一長條下來,但自己裝的不會有這種
03/19 13:56, 29F

03/19 13:56, , 30F
裝況
03/19 13:56, 30F
文章代碼(AID): #1Mwu1z07 (Linux)
文章代碼(AID): #1Mwu1z07 (Linux)