I have some experience on setting up a Chinese desktop with FreeBSD 4.3. Now with 8.1, seems need some enhancement and modification to make it work again.
- Chinese Environment. It is really not necessary to change the .login_conf. Read the login_conf man page, all it does is to setup the environment variables. So one just need to add the following three lines into .cshrc. (if csh is used):
setenv XMODIFIERS "@im=scim"
setenv LANG zh_CN.UTF-8
setenv LC_ALL zh_CN.UTF-8
- Notice above two things. First, I use scim as chinese input method. Second, I use zh_CN.UTF-8 as encoding
- The most important part is the display of fonts.
- Chinese font. First thing I did is to install WenQuanYi true type fonts. It provided some good fonts. WenQuanYi Micro Hei, and WenQuanYi Bitmap Song are the two I used.
- Create .fonts.conf in home directory:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!--
install ==> print/freetype2 [WITH_LCD_FILTERING=yes and assumes BCI not disabled]
install ==> x11-fonts/dejavu
install ==> x11-fonts/webfonts
install ==> x11-fonts/terminus-font
-->
<!-- preferred aliases -->
<alias>
<family>serif
<prefer>
<family>DejaVu Serif
<family>WenQuanYi Micro Hei
<family>WenQuanYi Bitmap Song
</prefer>
</alias>
<!-- preferred aliases -->
<alias>
<family>sans-serif
<prefer>
<family>DejaVu Sans
<family>WenQuanYi Micro Hei
<family>WenQuanYi Bitmap Song
</prefer>
</alias>
<!-- preferred aliases -->
<alias>
<family>monospace
<prefer>
<family>DejaVu Sans Mono
<family>Terminus
<family>WenQuanYi Micro Hei
<family>WenQuanYi Bitmap Song
</prefer>
</alias>
<!-- default quality settings -->
<match target="font">
<edit mode="assign" name="rgba">
<const>none
</edit>
<edit mode="assign" name="antialias">
<bool>true
</edit>
<edit mode="assign" name="autohint">
<bool>true
</edit>
<edit mode="assign" name="hinting">
<bool>true
</edit>
<edit mode="assign" name="hintstyle">
<const>hintfull
</edit>
</match>
<!-- reduce ringing ==> requires freetype2 'WITH_LCD_FILTERING=yes' -->
<match target="font">
<edit mode="assign" name="lcdfilter">
<const>lcdlight
</edit>
</match>
<!-- disable autohinting for bold fonts -->
<match target="font">
<test compare="more" name="weight">
<const>medium
</test>
<edit mode="assign" name="autohint">
<bool>false
</edit>
</match>
<!-- disable autohinting for fonts that don't need it -->
<match target="pattern" name="family">
<test name="family" qual="any">
<string>Andale Mono
<string>Arial
<string>Arial Black
<string>Comic Sans MS
<string>Courier New
<string>Georgia
<string>Impact
<string>Trebuchet MS
<string>Tahoma
<string>Times New Roman
<string>Verdana
<string>Webdings
</test>
<edit mode="assign" name="hinting">
<bool>true
</edit>
<edit mode="assign" name="autohint">
<bool>false
</edit>
</match>
</fontconfig>
- Terminal, use urxvt and set the font as:
urxvt -fn 'xft:dejavu sans mono:size=9,xft:wenquanyi bitmap song:size=9'
No comments:
Post a Comment