LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 03-30-2003, 06:27 PM   #1
GrimCracker
LQ Newbie
 
Registered: Mar 2003
Posts: 7

Rep: Reputation: 0
Angry Can't display Chinese in Slackware 9.0


After installing Slackware 9.0, I cannot reliably display Chinese under X (KDE). Some applications, like Konqueror and Hanzim display Chinese fine, but most, like Mozilla, instead display giant squares with hexidecimal numbers in them. I assume that this is a font issue but why would some programs work and others not? I am pulling my hair out over this. Please help.
 
Old 04-01-2003, 04:03 PM   #2
GrimCracker
LQ Newbie
 
Registered: Mar 2003
Posts: 7

Original Poster
Rep: Reputation: 0
Following up to my own post to add some more info. Mozilla works after removing the package that came with Slackware 9 and installing the copy from mozilla.org. For some reason, the one that comes with Slackware doesn't support Chinese.

But I still have the same problem in Pan that I had in Mozilla. Chinese newsgroups display nothing but squares with hex numbers in them. I downloaded and compiled Pan, but it still doesn't work. Does anyone know if it has to be compiled with special options?
 
Old 04-02-2003, 08:24 PM   #3
natedawg_38929
LQ Newbie
 
Registered: Oct 2002
Location: MS
Distribution: Slackware 9.1 XFS
Posts: 27

Rep: Reputation: 15
Download and install the (kdei) package. It provides multi-lingual support in KDE apps.
 
Old 05-22-2003, 12:16 AM   #4
vamp
LQ Newbie
 
Registered: May 2003
Distribution: Slackware-current
Posts: 19

Rep: Reputation: 0
What about our console tools, such as vim (or emacs)?

Does anyone know how to get vim to display chinese characters? I've tried the :set encode=big5 or whatever. Doesn't seem to work.

I'm thinking about serving some web pages with chinese characters, and it'd be nice to be able to edit with vim over a terminal and still understand the characters.
 
Old 05-22-2003, 01:36 AM   #5
xwings
LQ Newbie
 
Registered: Mar 2003
Distribution: Slackware
Posts: 10

Rep: Reputation: 0
goto
www.linuxsir.com
i posted some artical base on slackware 9,
or u can email me, i send u my document
 
Old 05-26-2003, 12:23 PM   #6
Rodrin
Member
 
Registered: May 2003
Location: Upstate NY, U.S.
Distribution: Slackware
Posts: 247

Rep: Reputation: 31
The original problem in this thread existed because the programs that would not display Chinese correctly were set to use True Type fonts, and no Chinese True Type fonts come with Slackware 9.0. The programs that would display Chinese correctly were probably using Type 1 Chinese fonts (although I haven't checked into this). A good way to solve this problem would be to install some Chinese True Type fonts on your system. There are a few available for free at the GNU ftp site. To install these fonts on your system just unzip them and copy them to a subdirectory under /usr/share/fonts. It doesn't matter what you name it, but something like truetype or TTF would make sense. Also remember to make the fonts world readable (chmod +r *.ttf). Then reboot your system (or run fc-cache on the directory you made and restart X and/or the program you wish to use the fonts with). The same goes for any new True Type fonts that you wish to add to your system.
 
Old 07-23-2003, 07:15 AM   #7
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Rep: Reputation: 31
I am trying to fix the same problem with mozilla, but I need it to display Japanese fonts other than Chinese ones. Is there anybody who know where can I get free Japanese true type fonts? Thanks in advance

Thanks for your explanation on installing fonts, Rodrin.
 
Old 07-24-2003, 12:59 AM   #8
Rodrin
Member
 
Registered: May 2003
Location: Upstate NY, U.S.
Distribution: Slackware
Posts: 247

Rep: Reputation: 31
Some of the easiest to find and extract, free Japanese True Type fonts are the ones from Microsoft. I found them at an Australian university ftp site. One is a serif font and the other is sans serif. I also found the serif font at a US university site.

Serif:
http://ftp.cc.monash.edu.au/pub/nihongo/JpnSupp.exe
for the full Windows install program or
http://www.math.wisc.edu/~lo/oldfiles/msgothic.zip
for just the font by itself (probably what you want for Linux)

Sans Serif:
http://ftp.cc.monash.edu.au/pub/nihongo/ie3lpkja.exe
(full Windows install)

The only problem with the sans serif file is that it is a Windows executable CAB file (if I remember correctly; if not, the only other possibility is a self extracting zip file). You need to either open it with a Windows machine or get cabextract and use it to extract the ttf file among the Windows installation files (unless it is a zip; then you just need to use unzip).

Unionway also offers a free Japanese font, but I don't know of any way to extract it without using Windows (I haven't bothered to extract it yet myself). Here's the link anyway:

http://www.unionway.com/asiansuite/uwjmg3.exe

There is also an RPM of some Japanese True Type fonts along with RPMs for a bunch of other language fonts available from the Sisyphus project (Alt Linux). I haven't looked to see what fonts are actually contained in it. Here's the link:

http://www.altlinux.com/index.php?mo...%2FTrue%20type

These should get you started anyway. You can also add True Type fonts to the programs in Slackware that don't use fontconfig with the following steps:

1. From the command prompt as root change to the directory where you have put the fonts and run mkfontscale and mkfontdir. For example:
cd /usr/share/fonts/TTF
/usr/X11R6/bin/mkfontscale
/usr/X11R6/bin/mkfontdir

(the order of these mk commands is important, and I accidentally had them inversed before; sorry)

2. Add to your XF86Config file:
a) In the Modules section
Load "freetype"

Edit: You may alternatively want to use the xtt module rather than freetype on a primarily Japanese machine. I don't know if the xtt module will cause any problems with fontconfig enabled programs or not since I have never run xtt.

b) In the Files section, the FontPath to the True Type fonts. For example:
FontPath "/usr/share/fonts/TTF/"

Last edited by Rodrin; 07-27-2003 at 11:42 PM.
 
1 members found this post helpful.
Old 07-24-2003, 02:27 AM   #9
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Rep: Reputation: 31
Installed Mozilla 1.4

Thanks a lot for your help, Rodrin!

I followed your advice in installing the Japanese fonts and mkfontdir, mkfontscale, etc. But mozilla stopped working after that. It doesn't even allow me to start the program and exit immediately with an error 11. This is the version of mozilla that caused me a lot of problems.

Mozilla 1.3
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313

So, I gave up and try installing the latest build from Mozilla.org, ie Mozilla 1.4 into a separate directory. Now I can see all Traditional Chinese, Simplified Chinese and Japanese fonts beautifully

One more question regarding truetype fonts. Can we simply copy truetype fonts from Windoz and use it in Linux? Are they the same for Windoz and Linux?
 
Old 07-24-2003, 07:45 AM   #10
Rodrin
Member
 
Registered: May 2003
Location: Upstate NY, U.S.
Distribution: Slackware
Posts: 247

Rep: Reputation: 31
If Mozilla crashes after you install the fonts, then that usually means you forgot to give read permission to the font files you installed. I mentioned this in the earlier post about installing True Type fonts, but I failed to mention that it could cause Mozilla to crash if you forgot to do it. If you forget to do it, that will also make the fonts unavailable to other programs (programs that get their fonts from X Window may still be able to use them because of the permissions X is running with; I've never checked; but fontconfig enabled programs won't be able to use them). Just run, as root, in the font directory,

chmod +r *.ttf *.TTF
or
chmod 644 *.ttf *.TTF
(Edit: I accidentally had this as 744 and +x before. If you used either of those, you really should run it again with 644, or run it with -x so that these files aren't flagged as executable on your system.)

That should take care of the crashing problem. I recommend you try to get the Mozilla that comes with Slackware 9 working because, if you have good True Type fonts, the fonts look a lot better in the fontconfig enabled version of Mozilla than they do in the regular version. (For English language True Type fonts I highly recommend the Bitstream Vera fonts and/or the fonts that come with Windows.) The other steps I added about running mkfontscale, mkfontdir, and so forth are only to make True Type fonts available to other programs that don't use fontconfig (like the version of Mozilla you are using at the moment). They are not necessary for the fonts to work with the fontconfig enabled version of Mozilla that comes with Slackware 9.0, or other fontconfig enabled programs, like the GNOME that comes with Slack 9.

In answer to your last question, yes, True Type fonts in Linux are the same as True Type fonts in Windows. Apple True Type fonts are different, but it is possible to convert them for use in Linux or Windows, although I have never done this myself.

Last edited by Rodrin; 07-24-2003 at 09:26 AM.
 
Old 07-24-2003, 09:25 PM   #11
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Rep: Reputation: 31
Thanks again, Rodrin. I have tried to make the fonts I installed world readable but it still doesn't work But I will try to find out if I have missed anything... and one more thing that I don't understand is the fontconfig thing. What is it and what does it do?
 
Old 07-24-2003, 11:11 PM   #12
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Rep: Reputation: 31
Problem fixed!!!

I finally repaired the original mozilla that comes with Slackware. Yeah, your are right, Rodrin. It does display fonts better

Btw, the cause of the problems is that: I forgot to make the truetype fonts I installed in /usr/X11R6/lib/X11/fonts/TTF world-readable.

Thanks again for your help, Rodrin.
 
Old 07-24-2003, 11:13 PM   #13
Rodrin
Member
 
Registered: May 2003
Location: Upstate NY, U.S.
Distribution: Slackware
Posts: 247

Rep: Reputation: 31
That is strange. Perhaps, as you suggested, there is something you or I missed, or something I did not state clearly enough. When you say it still doesn't work, do you mean Mozilla still crashes? I am using that version of Mozilla (the one that comes with Slackware 9) successfully with the Microsoft True Type Japanese fonts, the Chinese True Type fonts from GNU's ftp server, as well as the Bitstream Vera fonts and Microsoft Core Fonts for the Web (along with a few other True Type fonts). Perhaps you could post more information about your setup, like the name of the directory you made for your new fonts along with its full path and whether or not you have GNOME installed and the fonts are working for it. You could also check to see if fc-cache is running on startup like it normally does in Slack 9 and whether or not you see a fonts.cache-1 file in your True Type directory.

Fontconfig is a new way of dealing with fonts in X Window. Generally it really simplifies things (in Slackware at any rate) as well as providing high quality font rendering with anti-aliasing. The description from their web site reads, "Fontconfig is a library designed to provide system-wide font configuration, customization and application access." The programs in Slack that support it look really good once you have the proper fonts installed. In Slackware 9 the hard part is done for you because /etc/fonts.conf and /etc/fonts.dtd are set up already. With the default configuration of Slack 9, installing new True Type fonts for fontconfig enabled programs is as simple as putting them in the correct directory and making them world readable. (Although, by what I've read, fontconfig also supports Type1 fonts, some of the programs that use it, like fontconfig enabled Mozilla, appear to support only True Type fonts) Then you just reboot, and the fonts.cache-1 file is updated automatically to reflect your new fonts. The only reason you still have to make fonts.scale and fonts.dir files and fiddle with XF86Config is to make the fonts available to those programs that don't yet support fontconfig. The fonts don't look as good in these programs, but many of these are moving toward fontconfig support. For example, versions of both AbiWord and the Gimp that support fontconfig are in development for their next major releases (if not sooner). During this transitional period, you have to set up your fonts both the old way that Slackware used up to 8.1 and the new way for fontconfig enabled software if you want all your programs to have access to them.

By the way, I will be away for a few days without Internet access after tonight, so if I don't reply right away, don't think I gave up and am ignoring you. I will try to remember to check back when I return. Also, don't feel obligated to follow my suggestions to get it to work the way I think it ought to if you are satisfied with the way you've gotten it to work already.

P.S. You posted the problem as solved while I was composing this. You may find some of the information useful or interesting anyway. I'm glad I was able to help.

Last edited by Rodrin; 07-24-2003 at 11:15 PM.
 
Old 07-24-2003, 11:32 PM   #14
koyi
Member
 
Registered: Jul 2003
Location: Osaka, Japan
Distribution: Arch, Ubuntu
Posts: 421

Rep: Reputation: 31
You are really helpful, Rodrin. Thanks again for your detailed explanation I hope one day when I am no more a newbie I can help others, too, in the way you helped me.

Good luck
 
Old 10-22-2003, 05:12 AM   #15
baremacho
LQ Newbie
 
Registered: Oct 2003
Location: Nagano,Japan
Distribution: fedora1/2/3,Laser5
Posts: 13

Rep: Reputation: 1
It works!!

Quote:
Originally posted by Rodrin
Some of the easiest to find and extract, free Japanese True Type fonts are the ones from Microsoft. I found them at an Australian university ftp site. One is a serif font and the other is sans serif. I also found the serif font at a US university site.

Serif:
http://ftp.cc.monash.edu.au/pub/nihongo/JpnSupp.exe
for the full Windows install program or
http://www.math.wisc.edu/~lo/oldfiles/msgothic.zip
for just the font by itself (probably what you want for Linux)

Sans Serif:
http://ftp.cc.monash.edu.au/pub/nihongo/ie3lpkja.exe
(full Windows install)

The only problem with the sans serif file is that it is a Windows executable CAB file (if I remember correctly; if not, the only other possibility is a self extracting zip file). You need to either open it with a Windows machine or get cabextract and use it to extract the ttf file among the Windows installation files (unless it is a zip; then you just need to use unzip).

Unionway also offers a free Japanese font, but I don't know of any way to extract it without using Windows (I haven't bothered to extract it yet myself). Here's the link anyway:

http://www.unionway.com/asiansuite/uwjmg3.exe

There is also an RPM of some Japanese True Type fonts along with RPMs for a bunch of other language fonts available from the Sisyphus project (Alt Linux). I haven't looked to see what fonts are actually contained in it. Here's the link:

http://www.altlinux.com/index.php?mo...%2FTrue%20type

These should get you started anyway. You can also add True Type fonts to the programs in Slackware that don't use fontconfig with the following steps:

1. From the command prompt as root change to the directory where you have put the fonts and run mkfontscale and mkfontdir. For example:
cd /usr/share/fonts/TTF
/usr/X11R6/bin/mkfontscale
/usr/X11R6/bin/mkfontdir

(the order of these mk commands is important, and I accidentally had them inversed before; sorry)

2. Add to your XF86Config file:
a) In the Modules section
Load "freetype"

Edit: You may alternatively want to use the xtt module rather than freetype on a primarily Japanese machine. I don't know if the xtt module will cause any problems with fontconfig enabled programs or not since I have never run xtt.

b) In the Files section, the FontPath to the True Type fonts. For example:
FontPath "/usr/share/fonts/TTF/"
thanks Rodrin!!now i can browse japanese page!!

by the way,i still cannot use my keyboard to input the japanese language although i have configured my keyboard layout to 'japanese 106 key'.Can u tell me whats wrong and how i can fix it?

Last edited by baremacho; 10-22-2003 at 05:32 AM.
 
1 members found this post helpful.
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
display chinese in gnome NanoFxJ Linux - Software 4 03-27-2005 09:54 PM
could not display chinese so-fish Linux - Software 8 06-04-2004 06:44 PM
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


All times are GMT -5. The time now is 02:45 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration