LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-29-2005, 01:40 PM   #1
NanoFxJ
Member
 
Registered: Nov 2004
Location: Hacienda Heights, CA
Distribution: Debian
Posts: 60

Rep: Reputation: 15
Guide to Display Chinese in Debain Sarge


I spent an evening today on http://wiki.linux.org.hk/index.php/H...ng_Locale_Data
(Thanks for the people who worked on the wiki)to figure out how to display chinese in Debian (sorry haven't try the input part yet). I think I should tell everyone how I get it so whoever has trouble at least gets a little more help. Good luck guys!
Quote:
This article is written for Debian GNU/Linux 3.1 (Sarge) or higher (It will not work for Debian 3.0, Woody) .
First
Code:
dpkg-reconfigure locales
in there, choose
Code:
en_US ISO-8859-1
zh_TW BIG5
zh_TW.UTF-8 UTF-8
zh_CN GB2312
zh_CN.GBK GBK
zh_CN.UTF-8 UTF-8
zh_TW BIG5 and zh_TW.UTF-8 UTF-8 are for traditional chinese
zh_CN GB2312, zh_CN.GBK GBK, and zh_CN.UTF-8 UTF-8 are for simplified chinese
Recommend to Restart Linux
---------------------------------------------------------------------------------------------------
Second
we need to install chinese fonts, so linux can display it.
we need these:
# ttf-arphic-bsmi00lp - Arphic PL Shan Hei Sun Light (AR PL Mingti2L Big5), including about 13,000 traditional chinese characters in Big5.
# ttf-arphic-bkai00mp - Arphic PL Zen Kai Medium (AR PL KaitiM Big5), including about 13,000 traditional chinese characters in Big5.
# ttf-arphic-gbsn00lp - Arphic PL Bousung Light (AR PL SungtiL GB), including more then 7,000 simplified chinese characters in GB2312.
# ttf-arphic-gkai00mp - Arphic PL GB Zen Kai Medium (AR PL KaitiM GB), including more then 7,000 simplified chinese characters in GB2312.
so we use
Code:
apt-get install ttf-arphic-bkai00mp ttf-arphic-bsmi00lp ttf-arphic-gbsn00lp ttf-arphic-gbsn00lp
---------------------------------------------------------------------------------------------------
Third
Now, we need to configure local.conf file, it is located in /ect/fonts/local.conf
If you open it with any text editor, it should look like this
Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <include ignore_missing="yes">/var/lib/defoma/fontconfig.d/fonts.conf</include>
<!-- Uncomment below to enable bitmapped fonts -->
<!--
  <dir>/usr/X11R6/lib/X11/fonts</dir>
-->
  <match target="font">
    <test qual="all" name="rgba">
      <const>unknown</const>
    </test>
    <edit name="rgba" mode="assign"><const>rgb</const></edit>
  </match>
<!-- Uncomment below to enable the freetype autohinter module -->
<!--
  <match target="font">
    <edit name="autohint" mode="assign">
      <bool>true</bool>
    </edit>
  </match>
-->
NEW CODES HERE 
</fontconfig>
we add below codes into the local.conf (where NEW CODES HERE is, before </fontconfig>)
Disable anti-alias technology for Chinese fonts 16px or under:
Code:
<!-- Disable font alias for Chinese <= 16px -->
  <match target="font">
    <test qual="any" name="family" compare="eq">
      <string>AR PL Mingti2L Big5</string>
      <string>AR PL SungtiL Big5</string>
      <string>AR PL New Sung</string>
      <string>Ming(ISO10646)</string>
      <string>MingLiu</string>
      <string>PMingLiu</string>
      <string>Kochi Mincho</string>
      <string>Baekmuk Dotum</string>
    </test>
    <test name="pixelsize" compare="less_eq">
      <double>8</double>
    </test>
    <edit name="antialias">
      <bool>false</bool>
    </edit>
    <edit name="hinting">
      <bool>true</bool>
    </edit>
  </match>
Reset display order of serif fonts:
Code:
  <alias>
      <family>serif</family>
      <prefer>
         <family>Bitstream Vera Serif</family>
         <family>Times New Roman</family>
         <family>Times</family>
	  <family>AR PL New Sung</family>
	  <family>AR PL Mingti2L Big5</family>
	  <family>AR PL SungtiL GB</family>
	  <family>Ming(ISO10646)</family>
	  <family>SimSun</family>
	  <family>Kochi Mincho</family>
	  <family>Baekmuk Batung</family>
      </prefer>
  </alias>
Reset display order of sans-serif fonts:
Code:
  <alias>
      <family>sans-serif</family>
      <prefer>
         <family>Bitstream Vera Sans</family>
	  <family>Arial</family>
	  <family>Verdana</family>
	  <family>Helvetica</family>
	  <family>AR PL New Sung</family>
	  <family>Ming(ISO10646)</family>
	  <family>AR PL kaitiM Big5</family>
	  <family>AR PL kaitiM GB</family>
	  <family>Kochi Gothic</family>
	  <family>Baekmuk Dotum</family>
      </prefer>
  </alias>
Reset display order of monospace font:
Code:
  <alias>
      <family>monospace</family>
      <prefer>
         <family>Bitstream Vera Sans Mono</family>
	  <family>Courier New</family>
	  <family>Courier</family>
	  <family>AR PL New Sung</family>
	  <family>Ming(ISO10646)</family>
	  <family>Kochi Mincho</family>
	  <family>Baekmuk Batung</family>
      </prefer>
  </alias>
-----------------------------------------------------------------------------------------------
Fourth
Those fonts we installed are great, but it looks weird in Linux, so we can use FireFly patch to fix them.
We need to edit apt's source.list file which is located in /etc/apt/source.list
add a new resource *If you use Synaptic select Settings > Repositories:
Code:
      URI: ftp://ftp.hk.debian.org/unofficial/firefly/binary-i386
      Distribution: ./
      Section(s):
then
Code:
apt-get update
or "Reload" in Synaptic.
Finally, type
Code:
apt-get upgrade
or "Mark All Upgrades" in Synaptic(Choose "Default Upgrade")
it will upgrade these packets: fontconfig, libfontconfig1, and libxft2
----------------------------------------------------------------------------------------------
That's it, if you have any questions, let's discuss it toghether ( I am new to linux too, so...), that's what the forums for
 
Old 03-29-2005, 02:02 PM   #2
NanoFxJ
Member
 
Registered: Nov 2004
Location: Hacienda Heights, CA
Distribution: Debian
Posts: 60

Original Poster
Rep: Reputation: 15
I reinstalled my sarge and just realize that I didn't have a local.conf in /etc/fonts (I don't know why ), so I just create a new text file called local.conf and it works for me now
 
Old 04-05-2005, 12:46 AM   #3
damienduff
Member
 
Registered: Feb 2004
Distribution: Etch
Posts: 117

Rep: Reputation: 15
great work.

maybe u shld haf edited /etc/fonts/fonts.conf instead?

your firefly URI did not work for me.

i found a working link at http://www.study-area.org/apt/firefly-font/ but I am not sure where to put the fireflysung.ttf. Put it manually in /usr/share/fonts/truetype? Or use defoma-font register-all? anyway firefly is optional.
 
Old 04-05-2005, 05:21 PM   #4
NanoFxJ
Member
 
Registered: Nov 2004
Location: Hacienda Heights, CA
Distribution: Debian
Posts: 60

Original Poster
Rep: Reputation: 15
sorry, I don't know where to put it, but I'll look it up and tell you, and thanks for another link for firefly!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debain on Dell Inspiron 5000e - Display messed up. Leviaar Linux - Laptop and Netbook 2 10-27-2005 12:29 PM
Installed Debain Sarge, Xserver resolution rossjman1 Debian 10 06-18-2005 12:53 AM
Sound Config on Debain Sarge doctorwebbox Debian 8 05-24-2005 12:12 PM
Debain (sarge) Basic How To's notolerance Debian 0 12-10-2004 04:30 PM
color dir display in debain nash Linux - General 4 11-10-2004 07:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration