LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


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

Rep: Reputation: 15
display chinese in gnome(solved+solution)


Hi,
I had just installed Debian Sarge and Gnome.
Because I surf on Chinese websites, so I need my system to display Chinese.
I had done this but with no luck
Code:
apt-get xfonts-intl-chinese-big
apt-get ttf-arphic-bkai00mp
apt-get ttf-arphic-bsmi00lp
dpkg-reconfigure locales
It is referenced from this website
http://nic-nac-project.de/~murj/blog...english-system

Thanks in Advance!

Last edited by NanoFxJ; 03-27-2005 at 09:55 PM.
 
Old 03-26-2005, 03:02 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
OK - but what exactly failed to work?

Do I understand from your message that "dpkg -reconfigure locales" failed to ask you what locales you wanted to reconfigure? What?
 
Old 03-26-2005, 10:50 AM   #3
NanoFxJ
Member
 
Registered: Nov 2004
Location: Hacienda Heights, CA
Distribution: Debian
Posts: 60

Original Poster
Rep: Reputation: 15
the apt-get and dpkg didn't fail to work, but after I configure it, it still doesn't display chinese characters correctly
 
Old 03-27-2005, 09:20 PM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
OK - in what way are the characters not displayed correctly?

Are the wrong characters displayed?
Do you just get filler characters for chinese characters?
Do you get the simplified set when you expected traditional?
Perhaps they are just the wrong colour or size?
What?

If you want help you must state the nature of your problem.
From what you wrote, you may not have completed all the steps in the installation proceedure - for this I refer you back to the web page you gave in the original post (though the english there is quite challenging to read). Otherwise you will have to be more specific - what did you expect, what did you get, what have you tried???

Simon

Last edited by Simon Bridge; 03-27-2005 at 09:24 PM.
 
Old 03-27-2005, 09:54 PM   #5
NanoFxJ
Member
 
Registered: Nov 2004
Location: Hacienda Heights, CA
Distribution: Debian
Posts: 60

Original Poster
Rep: Reputation: 15
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
----------------------------------------------------------------------------------------------

Last edited by NanoFxJ; 03-27-2005 at 09:56 PM.
 
  


Reply



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
could not display chinese so-fish Linux - Software 8 06-04-2004 06:44 PM
Can't display Chinese in Slackware 9.0 GrimCracker Slackware 15 10-22-2003 08:03 AM
Mozilla can not display Chinese in Slackware9.1 preswang Linux - Software 5 10-16-2003 03:36 PM
How to display chinese filename kevin_liu Linux - Software 2 09-29-2003 07:08 AM
display chinese in console skyevil Debian 1 09-12-2003 06:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:21 AM.

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