Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo下中文字体加粗成功!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese)
View previous topic :: View next topic  
Author Message
wangxiaohu
Apprentice
Apprentice


Joined: 15 Nov 2003
Posts: 248

PostPosted: Wed Jul 13, 2005 4:42 am    Post subject: Gentoo下中文字体加粗成功! Reply with quote

不想说太详细,我懒:

0. 退出X。。。不退出X直接进行下列操作后果自负。

1. 新的freetype-2.1.10已经 ~x86 stable了,先装了再说。

2. 下载最新的 libXft,并prefix到/usr去: http://xlibs.freedesktop.org/release/

3. 修改 /etc/fonts/local.conf :

Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file for local customizations -->
<fontconfig>
   <dir>/opt/Ximian-OpenOffice/share/fonts/truetype</dir>
   <dir>/opt/Acrobat7/Resource/Font</dir>

     <match target="font">
         <!-- check to see if the font is just regular -->
         <test name="weight" compare="less_eq">

             <int>100</int>
         </test>
         <!-- check to see if the pattern requests bold -->
         <test target="pattern" name="weight" compare="more_eq">
             <int>180</int>
         </test>
         <!-- set the embolden flag -->
         <edit name="embolden" mode="assign">

             <bool>true</bool>
         </edit>
     </match>

<match target="font">
                <test target="pattern" name="lang" compare="contains">
                        <string>zh-tw</string>
                        <string>zh-cn</string>
                        <string>ja</string>
                        <string>ko</string>
                </test>
                <edit name="spacing">
                        <const>proportional</const>
                </edit>
                <edit name="globaladvance">
                <bool>false</bool>
                </edit>

</match>

<match target="font" >
                <test compare="contains" name="lang" >
                        <string>zh-cn</string>
                        <string>zh-tw</string>
                        <string>ja</string>
                        <string>ko</string>

                </test>
                <test compare="more_eq" name="pixelsize" qual="any" >
                        <double>8</double>
                </test>
                <test compare="less_eq" name="pixelsize" qual="any" >
                        <double>16</double>
                </test>
                <edit mode="assign" name="antialias" >

                        <bool>false</bool>
                </edit>
</match>

</fontconfig>


然后自己摸索一下吧。。。。。。。X起动不了是你自己的错,谁叫你尝鲜呢。。。

MD,这儿也没法贴图。。自己YY吧。。。
Back to top
View user's profile Send private message
wangxiaohu
Apprentice
Apprentice


Joined: 15 Nov 2003
Posts: 248

PostPosted: Wed Jul 13, 2005 4:55 am    Post subject: Reply with quote

刚发现一个缺点,就是xterm之类的老X程序一运行X就Crash了。。。嘿嘿。。爽。。。
Back to top
View user's profile Send private message
Fleta
n00b
n00b


Joined: 12 Dec 2004
Posts: 68

PostPosted: Wed Jul 13, 2005 5:30 am    Post subject: Reply with quote

So which package provides the bold effect? libXft? Did you uninstall your old libXft?
Back to top
View user's profile Send private message
r0bertz
Retired Dev
Retired Dev


Joined: 13 Sep 2004
Posts: 257
Location: HKSAR,China

PostPosted: Wed Jul 13, 2005 8:02 am    Post subject: Reply with quote

thanks to firefly, always has bold here, :), if you feel not bold enough, just disable antialiasing for some pixel size for asian fonts,
I've heard of that new freetype and libXft can render bold chinese character without firefly's path
However, haven't tried yet


Last edited by r0bertz on Thu Jul 14, 2005 6:10 am; edited 2 times in total
Back to top
View user's profile Send private message
bookstack
Apprentice
Apprentice


Joined: 27 Feb 2004
Posts: 245

PostPosted: Wed Jul 13, 2005 8:55 am    Post subject: Reply with quote

没有Xterm, 没有AA
代价太大了吧?
Back to top
View user's profile Send private message
wangxiaohu
Apprentice
Apprentice


Joined: 15 Nov 2003
Posts: 248

PostPosted: Wed Jul 13, 2005 3:47 pm    Post subject: Reply with quote

bookstack wrote:
没有Xterm, 没有AA
代价太大了吧?


中文字要什么AA啊。。只有英文才AA的。。。
Back to top
View user's profile Send private message
liuspider
Apprentice
Apprentice


Joined: 03 Feb 2003
Posts: 237

PostPosted: Thu Jul 14, 2005 12:55 am    Post subject: Reply with quote

just installed latest libxft 2.1.7, and now firefox can display bold chinese ;)

Comments to the thread starter:
1. all these packages can be installed under X
2. xterm does not crash here at all ;)

but in kde apps, still no bold face of chinese fonts...
_________________
BLOG: http://liucougar.scim-im.org
Back to top
View user's profile Send private message
r0bertz
Retired Dev
Retired Dev


Joined: 13 Sep 2004
Posts: 257
Location: HKSAR,China

PostPosted: Thu Jul 14, 2005 5:02 am    Post subject: Reply with quote

liuspider wrote:
just installed latest libxft 2.1.7, and now firefox can display bold chinese ;)

Comments to the thread starter:
1. all these packages can be installed under X
2. xterm does not crash here at all ;
but in kde apps, still no bold face of chinese fonts...

but kde apps can display bold chinese, if u use firefly's patch
to achieve this, do not specify chinese fonts for your apps, specify western fonts. Then you can choose bold. Then bold chinese can appear where it should appear
Back to top
View user's profile Send private message
r0bertz
Retired Dev
Retired Dev


Joined: 13 Sep 2004
Posts: 257
Location: HKSAR,China

PostPosted: Thu Jul 14, 2005 6:13 am    Post subject: Reply with quote

wangxiaohu wrote:
bookstack wrote:
没有Xterm, 没有AA
代价太大了吧?


中文字要什么AA啊。。只有英文才AA的。。。

Absolutely!
However, I still enable AA for larger size of asian fonts
Code:

<match target="font" >
  <test compare="eq" name="family" >
   <string>SimSun</string>
   <string>NSimSun</string>
   <string>AR PL New Sung</string>
   <string>MingLiU</string>
   <string>PMingLiU</string>
   <string>AR PL ZenKai Uni</string>
   <string>AR PL ZenKai Uni MBE</string>
   <string>AR PL ShanHeiSun Uni</string>
   <string>AR PL ShanHeiSun Uni MBE</string>
   <string>Ming(ISO10646)</string>
   <string>AR PL Mingti2L Big5</string>
   <string>AR PL SungtiL Big5</string>
   <string>Kochi Mincho</string>
   <string>Baekmuk Dotum</string>
  </test>
  <test compare="more" target="pattern" name="weight" >
   <const>medium</const>
  </test>
  <test compare="less_eq" name="pixelsize" >
   <double>20</double>
  </test>
  <edit name="hinting" >
   <bool>true</bool>
  </edit>
  <edit name="antialias" >
   <bool>false</bool>
  </edit>
  <edit name="autohint" >
   <bool>false</bool>
  </edit>
 </match>
Back to top
View user's profile Send private message
liuspider
Apprentice
Apprentice


Joined: 03 Feb 2003
Posts: 237

PostPosted: Thu Jul 14, 2005 9:24 pm    Post subject: Reply with quote

[quote="zhllg"]
liuspider wrote:

but kde apps can display bold chinese, if u use firefly's patch
to achieve this, do not specify chinese fonts for your apps, specify western fonts. Then you can choose bold. Then bold chinese can appear where it should appear


it would be better to use the "official" approach

at least, now firefox works fine
_________________
BLOG: http://liucougar.scim-im.org
Back to top
View user's profile Send private message
liuspider
Apprentice
Apprentice


Joined: 03 Feb 2003
Posts: 237

PostPosted: Thu Jul 14, 2005 11:49 pm    Post subject: Reply with quote

under konqueror, it seems that in some website, such as linuxsir, bold faces are fine; but here, no bold faces at all
_________________
BLOG: http://liucougar.scim-im.org
Back to top
View user's profile Send private message
wokick
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2004
Posts: 97

PostPosted: Thu Aug 25, 2005 1:48 pm    Post subject: Reply with quote

Now these packeges are included in portage, though masked.
I emerged them, and modified my .fonts.conf under my home directory, and then restart xserver.
However, NO bold!

How come? oh, I am using simsun font for chinese.

But with the new libXft, the chinese font does look better then ever.

BTW: AA still works. Xterm does not crash.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum