初用 gentoo 人如何正確的中文化?請看這裡.

Moderator: Forums Team

User avatar
【Palatis】
Posts: 956
Joined: Wed Apr 02, 2003 4:21 pm
Location: 偶爾插花...</br>亞利安星球
Contact:

Post by 【Palatis】 »

pahud wrote:題外話,firefly的patch以及xttmgr等,我覺得應該幫她寫個ebuild才對...
我想, 那些應該要 submit 到 freetype devel, xft/fc devel, 然後才會被 gentoo 採納吧.
當然, 有 got 的推薦說不定也比較容易進去.

xttmgr 是一定要 ebuild 的.
「從麻雀之城回來的時候,被問到『你要大的藤箱還是小的藤箱?』為此煩惱不已。大家都有過這種煩惱吧?」
「是啊是啊!大的藤箱可以放很多東西覺得很划算,小的藤箱小小的裡面也許放著很不錯的東西,真的很難取捨阿!」
「靠這個就能告別這種煩惱『中型的藤箱』!」
「好厲害!」
「不要再煩惱大小的問題了,現在還贈送可以煮出鐵質,增進健康的鐵銼刀。」
「這是一定要買的!」
「我要一個!」
Si
Posts: 333
Joined: Sun Apr 20, 2003 12:15 pm
Location: New Zealand

Post by Si »

coolbook wrote:我照了上面的作法成功的完成中文化了
大部份都很完美
可是卻發現了有某些字型會非常的難看
甚至還會分辨不出字來
請幫我看一下
我不久前也碰到同樣問題,後來到 /etc/fonts/fonts.conf 裡去找有一段關於 autohinting 的地方 zh locale 被關掉了,在那檔裡搜尋一下就可以找到了,把那 false 改成 true 就行了。
我現在在 Windoze 裡所以沒有這個檔給你看,不過這應該不難改。
coolbook
Posts: 5
Joined: Tue Apr 08, 2003 8:36 pm

Post by coolbook »

謝謝各位的幫助
我照著si的作法已經可以成功顯示那些字了
就是改/etc/fonts/fonts.conf這個檔

<match target="font" >
<test compare="contains" name="lang" >
<string>zh</string>
</test>
<edit mode="assign" name="hinting" >
<bool>false</bool>
</edit>
</match>
把上面那個false改成true ^^

還有請問各位先進
你們怎麼都知道這是那里出問題,要改那些地方
我也好想研究一下中文化呦!!
breaking
Posts: 184
Joined: Sun Apr 13, 2003 4:31 am
Location: 地球上一個小小的地方叫"台北內湖"啦
Contact:

關於螢火飛大大的patch在gentoo上有一疑問???

Post by breaking »

關於螢火飛大大的patch在gentoo上有一疑問???

因為之前swallowman大有說要patch pango-1.2.1-style.patch這一個

那請問是否
fontconfig-2.1.92-CJK-fixwidth-multifamily-20030401.patch
freetype-2.1.4-autohint-cjk-20030416.patch
freetype-2.1.4-misscmap-enablebytecode-20030410.patch
mozilla-1.3-CJK-family-underline-20030408.patch
qt-x11-free-3.1.2-qfont-jp-family-subst-20030223.patch
qt-x11-free-3.1.2-qpsprinter-ttc-italic-20030309.patch
Xft-2.1-CJK-bold-bitmap-20030417.patch

以上這七個patch是否在gentoo就不需patch呢???

還是說也要將這七個patch分別放入fontconfig.freetype.mozilla.qt.Xft各自的/usr/portage/xxxx/xxxxx/files/中,再修改各自的ebuild後,重新emerge呢???
breaking
Posts: 184
Joined: Sun Apr 13, 2003 4:31 am
Location: 地球上一個小小的地方叫"台北內湖"啦
Contact:

關於螢火飛大大的patch在gentoo上

Post by breaking »

啊........不管三七二十一啦....... :oops:

我已經把
fontconfig-2.1.92-CJK-fixwidth-multifamily-20030401.patch
freetype-2.1.4-autohint-cjk-20030416.patch
freetype-2.1.4-misscmap-enablebytecode-20030410.patch
mozilla-1.3-CJK-family-underline-20030408.patch
qt-x11-free-3.1.2-qfont-jp-family-subst-20030223.patch
qt-x11-free-3.1.2-qpsprinter-ttc-italic-20030309.patch
Xft-2.1-CJK-bold-bitmap-20030417.patch
patch pango-1.2.1-style.patch
修改各自的ebuild後,重新emerge了

效果很不錯的說..... :D

可是不知為何唯有fontconfig-2.1.92-CJK-fixwidth-multifamily-20030401.patch掛點

還是說fontconfig不需再patch呢???

p.s.實在對這些patch的function不甚瞭解..... :(
User avatar
【Palatis】
Posts: 956
Joined: Wed Apr 02, 2003 4:21 pm
Location: 偶爾插花...</br>亞利安星球
Contact:

Post by 【Palatis】 »

我沒有 patch 掛點喔, 我直接在一堆它的 epatch 下面加上

Code: Select all

epatch /path/to/fontconfig-2.1.92-CJK-fixwidth-multifamily-20030401.patch
連複製到 ${files} 都免了, 反正 emerge sync 以後全部都會不見.

請問您掛點的錯誤訊息和您的 fontconfig 版本?
「從麻雀之城回來的時候,被問到『你要大的藤箱還是小的藤箱?』為此煩惱不已。大家都有過這種煩惱吧?」
「是啊是啊!大的藤箱可以放很多東西覺得很划算,小的藤箱小小的裡面也許放著很不錯的東西,真的很難取捨阿!」
「靠這個就能告別這種煩惱『中型的藤箱』!」
「好厲害!」
「不要再煩惱大小的問題了,現在還贈送可以煮出鐵質,增進健康的鐵銼刀。」
「這是一定要買的!」
「我要一個!」
breaking
Posts: 184
Joined: Sun Apr 13, 2003 4:31 am
Location: 地球上一個小小的地方叫"台北內湖"啦
Contact:

Post by breaking »

掛點的錯誤訊息如下
<位於/var/tmp/portage/fontconfig-2.1-r1/temp/fontconfig-2.2-local_fontdir.patch-8379.out>

Code: Select all

***** fontconfig-2.2-local_fontdir.patch *****

==============================================

PATCH COMMAND:  patch  -p0 < /usr/portage/media-libs/fontconfig/files/patch/font
config-2.2-local_fontdir.patch

==============================================
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ur fontconfig-2.1.94/fonts.conf.in fontconfig-2.1.94.patched/fonts.conf.i
n
|--- fontconfig-2.1.94/fonts.conf.in    2003-04-16 23:57:38.000000000 +0200
|+++ fontconfig-2.1.94.patched/fonts.conf.in    2003-04-18 02:59:54.000000000 +0
200
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
==============================================

PATCH COMMAND:  patch  -p1 < /usr/portage/media-libs/fontconfig/files/patch/fontconfig-2.2-local_fontdir.patch

==============================================
patching file fonts.conf.in
Hunk #1 FAILED at 25.
1 out of 1 hunk FAILED -- saving rejects to file fonts.conf.in.rej
==============================================

PATCH COMMAND:  patch  -p2 < /usr/portage/media-libs/fontconfig/files/patch/font
config-2.2-local_fontdir.patch

==============================================
missing header for unified diff at line 4 of patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ur fontconfig-2.1.94/fonts.conf.in fontconfig-2.1.94.patched/fonts.conf.i
n
|--- fontconfig-2.1.94/fonts.conf.in    2003-04-16 23:57:38.000000000 +0200
|+++ fontconfig-2.1.94.patched/fonts.conf.in    2003-04-18 02:59:54.000000000 +0
200
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
==============================================

PATCH COMMAND:  patch  -p3 < /usr/portage/media-libs/fontconfig/files/patch/font
config-2.2-local_fontdir.patch

==============================================
missing header for unified diff at line 4 of patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ur fontconfig-2.1.94/fonts.conf.in fontconfig-2.1.94.patched/fonts.conf.i
n
|--- fontconfig-2.1.94/fonts.conf.in    2003-04-16 23:57:38.000000000 +0200
|+++ fontconfig-2.1.94.patched/fonts.conf.in    2003-04-18 02:59:54.000000000 +0
200
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
==============================================

PATCH COMMAND:  patch  -p4 < /usr/portage/media-libs/fontconfig/files/patch/font
config-2.2-local_fontdir.patch

==============================================
missing header for unified diff at line 4 of patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ur fontconfig-2.1.94/fonts.conf.in fontconfig-2.1.94.patched/fonts.conf.i
n
|--- fontconfig-2.1.94/fonts.conf.in    2003-04-16 23:57:38.000000000 +0200
|+++ fontconfig-2.1.94.patched/fonts.conf.in    2003-04-18 02:59:54.000000000 +0
200
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
我的 fontconfig 版本為

Code: Select all

# emerge search fontconfig
Searching...   
[ Results for search key : fontconfig ]
[ Applications found : 1 ]
 
*  media-libs/fontconfig
      Latest version available: 2.1-r1
      Latest version installed: 2.1-r1
      Size of downloaded files: 531 kB
      Homepage:    http://fontconfig.org/
      Description: A library for configuring and customizing font access.
p.s.好像過長,若造成不便,煩請版主kill掉.....thX..... :oops:
User avatar
【Palatis】
Posts: 956
Joined: Wed Apr 02, 2003 4:21 pm
Location: 偶爾插花...</br>亞利安星球
Contact:

Post by 【Palatis】 »

Code: Select all

src_unpack() {
        unpack ${A}

        cd ${S}
        local PPREFIX="${FILESDIR}/patch/${PN}"

        # Cvs update from XFree86 tree
        epatch ${PPREFIX}-${PV}-cvs-update-20021221.patch
        
        # Some patches from Redhat
        epatch ${PPREFIX}-2.0-defaultconfig.patch
        epatch ${PPREFIX}-${PV}-slighthint.patch
        # Blacklist certain fonts that freetype can't handle
        epatch ${PPREFIX}-0.0.1.020826.1330-blacklist.patch
        # Fix config script to alway include X11 fontpath and remove date
        epatch ${PPREFIX}-${PV}-x11fontpath-date-configure-v2.patch 
        # fix font width bug with cjk fonts
        epatch ${PPREFIX}-${PV}-fixedwidth.patch

        # patch from firefly
        epatch /path/to/fontconfig-2.1.92-CJK-fixwidth-multifamily-20030401.patch
}
請把 /usr/portage/media-libs/fontconfig/fontconfig-2.1-r1.ebuild 中的 src_unpack() 改成如上.
最後一個的那個 /path/to 請改成您的 path.
「從麻雀之城回來的時候,被問到『你要大的藤箱還是小的藤箱?』為此煩惱不已。大家都有過這種煩惱吧?」
「是啊是啊!大的藤箱可以放很多東西覺得很划算,小的藤箱小小的裡面也許放著很不錯的東西,真的很難取捨阿!」
「靠這個就能告別這種煩惱『中型的藤箱』!」
「好厲害!」
「不要再煩惱大小的問題了,現在還贈送可以煮出鐵質,增進健康的鐵銼刀。」
「這是一定要買的!」
「我要一個!」
breaking
Posts: 184
Joined: Sun Apr 13, 2003 4:31 am
Location: 地球上一個小小的地方叫"台北內湖"啦
Contact:

Post by breaking »

哇~~~可以了.........:D

真是太感謝Palatis大囉
Si
Posts: 333
Joined: Sun Apr 20, 2003 12:15 pm
Location: New Zealand

Post by Si »

coolbook wrote:謝謝各位的幫助
我照著si的作法已經可以成功顯示那些字了
就是改/etc/fonts/fonts.conf這個檔

<match target="font" >
<test compare="contains" name="lang" >
<string>zh</string>
</test>
<edit mode="assign" name="hinting" >
<bool>false</bool>
</edit>
</match>
把上面那個false改成true ^^

還有請問各位先進
你們怎麼都知道這是那里出問題,要改那些地方
我也好想研究一下中文化呦!!
我是在一個討論區看到螢火飛提到此問題才解決了困擾我幾個月的問題。
User avatar
【Palatis】
Posts: 956
Joined: Wed Apr 02, 2003 4:21 pm
Location: 偶爾插花...</br>亞利安星球
Contact:

Post by 【Palatis】 »

Si wrote:
coolbook wrote:還有請問各位先進
你們怎麼都知道這是那里出問題,要改那些地方
我也好想研究一下中文化呦!!
我是在一個討論區看到螢火飛提到此問題才解決了困擾我幾個月的問題。
其實... 是這段搞的鬼

Code: Select all

<!-- 
 We can't hint CJK fonts well, so turn off hinting for CJK fonts.
 -->
        <match target="font">
                <test name="lang" compare="contains">
                        <string>ja</string>
                </test>
                <edit name="hinting" mode="assign">
                        <bool>false</bool>
                </edit>
        </match>
        <match target="font">
                <test name="lang" compare="contains">
                        <string>ko</string>
                </test>
                <edit name="hinting" mode="assign">
                        <bool>false</bool>
                </edit>
        </match>
        <match target="font">
                <test name="lang" compare="contains">
                        <string>zh</string>
                </test>
                <edit name="hinting" mode="assign">
                        <bool>false</bool>
                </edit>
        </match>
我的作法是把那個 "-->" 拿到最下面, 變成這樣...

Code: Select all

<!-- 
 We can't hint CJK fonts well, so turn off hinting for CJK fonts.

        <match target="font">
                <test name="lang" compare="contains">
                        <string>ja</string>
                </test>
                <edit name="hinting" mode="assign">
                        <bool>false</bool>
                </edit>
        </match>
        <match target="font">
                <test name="lang" compare="contains">
                        <string>ko</string>
                </test>
                <edit name="hinting" mode="assign">
                        <bool>false</bool>
                </edit>
        </match>
        <match target="font">
                <test name="lang" compare="contains">
                        <string>zh</string>
                </test>
                <edit name="hinting" mode="assign">
                        <bool>false</bool>
                </edit>
        </match>
 -->
不想改的人, 整段 delete 掉也可以.

還有, 為什麼都知道要去那裡找問題呢... 只能說是經驗.
以此例來說...
1. font 問題 (和 font 有關的 package 有 freetype, fontconfig, xft)
2. 細明體 (細明體 hinting 會有問題, 這個已經是舊文了)
3. 如何設定? (當然是 fontconfig 啦, 這個名字裡面就有 "config" 字樣.)
4. fonts.conf 裡面和 hinting 有關的部份? (隨便改改, true 改 false, false 改 true, 不然就隨便給個什麼跑跑.)
5. 結果發現不要動他 hinting 的部份就好了...
「從麻雀之城回來的時候,被問到『你要大的藤箱還是小的藤箱?』為此煩惱不已。大家都有過這種煩惱吧?」
「是啊是啊!大的藤箱可以放很多東西覺得很划算,小的藤箱小小的裡面也許放著很不錯的東西,真的很難取捨阿!」
「靠這個就能告別這種煩惱『中型的藤箱』!」
「好厲害!」
「不要再煩惱大小的問題了,現在還贈送可以煮出鐵質,增進健康的鐵銼刀。」
「這是一定要買的!」
「我要一個!」
paar
Posts: 1154
Joined: Thu Jan 30, 2003 10:53 am
Location: 打狗市
Contact:

Post by paar »

Si wrote:
coolbook wrote:謝謝各位的幫助
我照著si的作法已經可以成功顯示那些字了
就是改/etc/fonts/fonts.conf這個檔

<match target="font" >
<test compare="contains" name="lang" >
<string>zh</string>
</test>
<edit mode="assign" name="hinting" >
<bool>false</bool>
</edit>
</match>
把上面那個false改成true ^^

還有請問各位先進
你們怎麼都知道這是那里出問題,要改那些地方
我也好想研究一下中文化呦!!
我是在一個討論區看到螢火飛提到此問題才解決了困擾我幾個月的問題。
看了各位的討論小弟也覺得很奇怪,
我照著我 po 的動作做而已, 也沒去動/etc/fonts/fonts.conf 這個檔,
但我都沒出現以上這些問題..這是為什麼咧?
paar
Posts: 1154
Joined: Thu Jan 30, 2003 10:53 am
Location: 打狗市
Contact:

Post by paar »

paar wrote:看了各位的討論小弟也覺得很奇怪,
我照著我 po 的動作做而已, 也沒去動/etc/fonts/fonts.conf 這個檔,
但我都沒出現以上這些問題..這是為什麼咧?
剛剛回頭看了一下 screenshot, 可能是我沒在用 Konqueror,
我用 gnome 下的 mozilla 和 phoenix 是 OK 的.
等回家去我的機器找 Konqueror 出來看會不會這樣..:p
Si
Posts: 333
Joined: Sun Apr 20, 2003 12:15 pm
Location: New Zealand

Post by Si »

其實我還有一個問題沒解決,我的 xmms 用遍了各種解決方案居然都沒用,選單的中文就是亂碼.............但 play list 裡的中文就沒問題,不過在 mp3 info 裡也是亂碼,而且除了歌名,其他像歌手都是空白?! 在 winamp 裡很正常啊........
breaking
Posts: 184
Joined: Sun Apr 13, 2003 4:31 am
Location: 地球上一個小小的地方叫"台北內湖"啦
Contact:

Post by breaking »

Code: Select all

我的 xmms 用遍了各種解決方案居然都沒用,選單的中文就是亂碼.............
嗯,我的很正常的說..... 8)

我xmms的"撥放清單"及"主要視窗"都是設一樣的

設定如下:

Code: Select all

-dynalab-pmingliu-medium-r-normal--0-0-0-0-c-0-big5-0,-dynalab-pmingliu-medium-r-normal--0-0-0-0-p-0-iso8859-1
p.s.您參考一下好囉....

圖:
http://home.kimo.com.tw/tuxchen/mydesk.png
Post Reply