cht電腦資訊Linux
adm Find login register

解決 Mandriva 2010 gnome-terminal 中文字糢糊的問題。

eliu

joined: 2007-08-09
posted: 11468
promoted: 617
bookmarked: 187
新竹, 台灣
1subject: 解決 Mandriva 2010 gnome-terminal 中文字糢糊的問題。Promote 0 Bookmark 02010-05-29quote  

/etc/fonts/conf.avail/65-nonlatin.conf[/quote
         <alias>
                <family>monospace</family>
                <prefer>
                        <family>AR PL New Sung</family> <!-- han (zh-cn,zh-tw) -->
                        <family>Miriam Mono</family> <!-- hebrew -->
                        <family>VL Gothic</family>
                        <family>IPAMonaGothic</family>
                        <family>IPAGothic</family>
                        <family>AR PL New Sung Mono</family> <!-- han (zh-cn,zh-tw) -->
                        <family>Sazanami Gothic</family>
終端機我們一般是用 monospace 也就是固定寬度的字型。上面就是把有內嵌bitmap 字型的 AR PL New Sung  放到最前面,這樣就不會有字型模糊的問題。真希望 fontconfig 可以做到根據語系選適當的 font,而不是固定的方式。 

guest
2subject: Promote 0 Bookmark 02010-05-29quote  

但是AR PL New Sung不是等寬字耶,

下面的AR PL New Sung Mono才是等寬,

而且也有點陣字。

eliu

joined: 2007-08-09
posted: 11468
promoted: 617
bookmarked: 187
新竹, 台灣
3subject: Promote 0 Bookmark 02010-05-29quote  

把 New Sung Mono 放在前面

$ fc-match monospace
odosung.ttc: "AR PL New Sung Mono" "Regular"

出來的中文就是模糊的。只有 AR PL New Sung 才有 bitmap 的效果,我也不知道為什麼。

我的 terminal 是設定成 courier

edited: 2
本人已不在此站活動

joined: 2007-09-19
posted: 4946
promoted: 325
bookmarked: 206
歸隱山林
4subject: Promote 0 Bookmark 02010-05-29quote  
eliu
把 New Sung Mono 放在前面

$ fc-match monospace
odosung.ttc: "AR PL New Sung Mono" "Regular"

出來的中文就是模糊的。只有 AR PL New Sung 才有 bitmap 的效果,我也不知道為什麼。

我的 terminal 是設定成 courier

edt1023:~$ fc-match -a courier
cour.pfa: "Courier" "Regular"
courb.pfa: "Courier" "Bold"
couri.pfa: "Courier" "Italic"
courbi.pfa: "Courier" "Bold Italic"
mingliu.ttf: "MingLiU" "Regular"

所以,在我的系統,如果選  courier,那麼第一個會 match 到的中文字型就是 mingliu.ttf。

要用  AR PL New Sung Mono,必需:

  1.  courier 去綁死 AR PL New Sung Mono。英文字母用 courier 顯示,中文字用 AR PL New Sung Mono 顯示。
  2. 直接選取 AR PL New Sung Mono。中英文字皆是由 AR PL New Sung Mono 負責顯示。

否則他會依 language tag 去找字型,這時就不一定了,要看字型的 tag 是否正確(可由 fc-match -v 看得到 lang tag)。


eliu

joined: 2007-08-09
posted: 11468
promoted: 617
bookmarked: 187
新竹, 台灣
5subject: Promote 0 Bookmark 02010-05-29quote  

我是設定成 courier,結果 terminal 自動替換成 "Liberation Mono"

用 fc-match -a 'Liberation mono' 看

 "AR PL New Sung Mono" 是排在中文 font 的第一個

本人已不在此站活動

joined: 2007-09-19
posted: 4946
promoted: 325
bookmarked: 206
歸隱山林
6subject: Promote 0 Bookmark 02010-05-29quote  

eliu
我是設定成 courier,結果 terminal 自動替換成 "Liberation Mono"

不懂,設成  courier 會自動去用 Liberation Mono?可能是你系統根本就沒有 courier,所以是使用他的 alias。

 

fc-match -a 'Liberation mono' 看

 "AR PL New Sung Mono" 是排在中文 font 的第一個

抱歉這個可能會有錯誤,因為要看螢幕上有什麼字,有些字不在某字型裡頭,這個字型不會被優先選取。

這樣說好了,是不是用英文  courier 配合中文的 AR PL New Sung Mono 使用?不然直接選用 AR PL New Sung Mono 不是就可以了嗎?


edited: 1
eliu

joined: 2007-08-09
posted: 11468
promoted: 617
bookmarked: 187
新竹, 台灣
7subject: Promote 0 Bookmark 02010-05-29quote  

LGJ
不然直接選用 AR PL New Sung Mono 不是就可以了嗎?
會變成這樣,數字變成模糊的

而且,我比較喜歡 courier 的 font

本人已不在此站活動

joined: 2007-09-19
posted: 4946
promoted: 325
bookmarked: 206
歸隱山林
8subject: 解決 Mandriva 2010 gnome-terminal 中文字糢糊的問題。Promote 0 Bookmark 02010-05-29quote  

eliu
終端機我們一般是用 monospace 也就是固定寬度的字型。上面就是把有內嵌bitmap 字型的 AR PL New Sung  放到最前面,這樣就不會有字型模糊的問題。真希望 fontconfig 可以做到根據語系選適當的 font,而不是固定的方式。 

這樣的話,等於在應用軟體要用到  monospace 時,其實用的是 AR PL New Sung 中的醜醜的英文字母。

比較理想的是自行另外去設定。

而且。會不去使用字型裡頭的點陣字,可能是因為系統上有設定了某類字型不用 bitmap 的關係。


本人已不在此站活動

joined: 2007-09-19
posted: 4946
promoted: 325
bookmarked: 206
歸隱山林
9subject: Promote 0 Bookmark 02010-05-29quote  
eliu
會變成這樣,數字變成模糊的

而且,我比較喜歡 courier 的 font

~/.fonts.conf

 <?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
  <test name="family" compare="eq">
    <string>mono</string>
  </test>
  <edit name="family" mode="assign" binding="strong">
     <string>courier</string>
     <string>AR PL New Sung</string>
  </edit>
</match>
</fontconfig>

不過,從上面所說的,你的系統應該是沒有正統的 courier,而是轉到其他字型去了。


edited: 1
本人已不在此站活動

joined: 2007-09-19
posted: 4946
promoted: 325
bookmarked: 206
歸隱山林
10subject: Promote 0 Bookmark 02010-05-29quote  
guest
但是AR PL New Sung不是等寬字耶,

中文字型在中文字的部份都是等寬的。

會不等寬是因為他的英文字母的部份不等寬。


Silice
joined: 2007-11-22
posted: 305
promoted: 47
bookmarked: 17
11subject: Promote 0 Bookmark 02010-05-30quote  

Lenny don't support bitmap default.
$ dpkg-reconfigure fontconfig-config
$ cd ~/.fonts
$ fc-cache -f -v

my ~/.fonts.conf

<match target="pattern" >
        <test compare="eq" name="family" >
                <string>monospace</string>
        </test>
        <edit mode="assign" binding="strong" name="family" >
                <string>DejaVu Sans Mono</string>
                <string>Firefly New Sung</string>
                <string>HAN NOM A</string>
                <string>HAN NOM B</string>
        </edit>
</match>

Regards

edited: 3
本人已不在此站活動

joined: 2007-09-19
posted: 4946
promoted: 325
bookmarked: 206
歸隱山林
12subject: Promote 0 Bookmark 02010-05-30quote  
Silice
Lenny don't support bitmap default.

$ dpkg-reconfigure fontconfig-config
$ cd ~/.fonts
$ fc-cache -f -v

my ~/.fonts.conf

<match target="pattern" >
        <test compare="eq" name="family" >
                <string>monospace</string>
        </test>
        <edit mode="assign" binding="strong" name="family" >
                <string>DejaVu Sans Mono</string>
                <string>Firefly New Sung</string>
                <string>HAN NOM A</string>
                <string>HAN NOM B</string>
        </edit>
</match>

Regards

<match target="font" >
  <test name="family" >
   <string>Firefly New Sung</string>
  </test>
  <edit mode="assign" binding="strong" name="embeddedbitmap" >
    <bool>true</bool>
  </edit>
</match>

試看看能不能蓋過系統值。


CC: 字型
cht電腦資訊Linux
adm Find login register
views:30012