From: rchui@nswc-wo.nswc.navy.mil (Raymond Chui)
Newsgroups: soc.culture.hongkong,soc.culture.taiwan,soc.culture.china
Subject: Re: Looking for cxterm user's  guide
Date: 5 Oct 92 18:40:01 GMT
Article-I.D.: relay.1992Oct5.184001.19270
Organization: Naval Surface Warfare Center - White Oak

In article <1992Oct1.194807.25665@dsg.tandem.com>, leung@DSG.Tandem.COM (Steven Leung) writes

|> cxterm is just an xterm with the capability to display chinese char.
|> To enter chinese char., you can use celvis (see the attached file),
|> or the brute-force method of cat > filename.



|> (2) How to Install X11 Chinese Font (cclib16st or others)
|>     -----------------------------------------------------
|> 
|>     Create a dedicated directory for the fonts in your workstation.
|>     Assuming ~/xfonts in the following illustration.
|> 
|>   1) Step I:  Installation
|> 
|>     Choose _one_ of the installation procedures, according to the window
|>     system you are using.
|> 
|>     - X11R4		(X Window System Version 11 Release 4)
|> 
|>         % mkdir ~/xfonts
|>         % mv cclib16st.bdf.Z 8x18.bdf fonts.alias ~/xfonts
|>         % cd ~/xfonts
|>         % bdftosnf -t 8x18.bdf > 8x18.snf
|>         % zcat cclib16st.bdf.Z | bdftosnf -t > cclib16st.snf
|>         % mkfontdir .
|> 
|>     - X11R5		(X Window System Version 11 Release 5)
|> 
|>         % mkdir ~/xfonts
|>         % mv cclib16st.bdf.Z fonts.alias ~/xfonts
|>         % cd ~/xfonts
|>         % zcat cclib16st.bdf.Z | bdftopcf -t > cclib16st.pcf
|>         % mkfontdir .
|> 

I installed cxterm and celvis in Sun 4-690, running X11R5, fonts 
installed in my personal IRIS, running X11R4,
because I work on personal IRIS console. Here is my fonts.dir file:

8
cclib16fs.pcf.Z     -cclib-song-delicate-r-normal--16-150-78-78-c-160-gb2312.1980-1
cclib16st.pcf.Z     -cclib-song-medium-r-normal--16-160-72-72-c-160-gb2312.1980-1
8x16.pcf.Z          -sony-fixed-medium-r-normal--16-120-100-100-c-80-iso8859-1
8x15.pcf.Z          8x15
8x18.pcf.Z          8x18
8x18big5.pcf.Z      8x18big5
cclib16ft.pcf.Z     cclib16ft
HKU-Ch16.pcf.Z      hku-ch16

My questions are what different between cclib16fs, cclib16st and cclib16ft?
Why cclib16fs and cclib16st used a particular font family name and font size?
And why cclib16ft dosen't used any font name and font size?


 


|>  Q: I failed in install the fonts, what's wrong?
|> 
|>  A: Here is how to test your font installation:
|> 
|>     1)  run
|> 		% xset q
|> 
|> 	You will see a list of directories under "Font Path:" section.
|> 	The path-name of your new-added font directory, should appear
|> 	on the list exactly once.
|> 
|> 	If you cannot find your new-added font directory in the list,
|> 	your installation failed.  It may be caused by:
|> 
|> 	
|> 
|> 	d)  there are too many directories in the "Font Path:" list (remove
|> 	    some unimportant ones to make rooms for this new one); or

	How many are too many? This is the display from my personal
	Iris when I type xset q:


Font Path:
  /usr/lib/X11/fonts/100dpi/,/usr/lib/X11/fonts/75dpi/,/usr/lib/X11/fonts/misc/, \
/usr/lib/fmfonts/,/usr/people/rchui/xfonts/

	where xfont directory contain my Chinese fonts
When I type xlsfonts |grep cclib, here is the display:

-cclib-song-delicate-r-normal--16-150-78-78-c-160-gb2312.1980-1
-cclib-song-medium-r-normal--16-160-72-72-c-160-gb2312.1980-1
cclib16ft



|>  Q: When I start X11R5 cxterm (11.5.1), it prints error messages
|> 	"cxterm:  unable to locate a suitable font".
|> 
|>  A: This may be a font installation problem, see the previous question.
|> 
|>     Or, your X window don't have "8x16" font.  (For example, in DECstation.)
|>     You can specify an alternative font explicitly as:
|> 
|> 	% cxterm -fn '-sony-fixed-medium-r-normal--16-120-*-*-*-*-iso8859-1'
|>     or
|> 	% cxterm -fn 8x18
|>     or
|> 	% cxterm -fn fixed                      (the last resort)
|> 
|>     You may simply edit your ~/.Xdefaults file to replace the string
|>     "8x16" by the name of the alternative font.  For example:
|> 
|>         cxterm*font: -sony-fixed-medium-r-normal--16-120-*-*-*-*-iso8859-1


When I start cxterm in tcsh in Sun 690 with remote display to my Iris
setenv DISPLAY myhostname:0.0
cxterm -fh font_name &
But the only fonts work for me are cclib16ft and hku-ch16 fonts.
All other fonts get an error message:
"cxterm:  unable to locate a suitable font" 

Why is that?

|>  Q: I cannot input or output Chinese in the shell prompt -- what I got is
|>     two random ASCII characters instead of a Chinese character.
|> 
|>  A: Maybe the 8th bits are stripped from the Chinese characters.
|> 
|>     Cxterm tries to set the proper tty for you, but the user or the system
|>     may later mistakenly reset it.
|> 
|>     Some shell (e.g. tcsh) strips the 8th bit.  In tcsh, hi-bit set characters
|>     are used for special key bindings.  To correct this, type "setenv LANG".
|>     Csh, sh, ksh usually don't have this problem.
|> 
|>     Some system (or your shell startup file, e.g. .cshrc or .login) set the
|>     tty to strip the 8th bit.  You can reset it by typing "stty pass8".
|>     (Different systems may have different stty format.  Read stty(1) manual
|>     for help.  Some possible stty options are "pass8", "cs8", "-istrip",
|>     "-parenb", etc.)
|> 
|>     Check your X resource file.  If you find something like "eightBitOutput",
|>     set it to be "true" or "on".  (Or simply remove it, the default is "on".)
|> 
|>     Some operating system may strip the 8th bit from every character.
|>     You are out of luck since such system is not for international use.
|> 

Well, I don't know. Sometime when I used celvis, it just freez my mouse pointer
and blow me out, kick me out. Only thing I think is my personal Iris dose not
has enough memory(only 8 MB). But sometimes everything works fine for me.
Strange!



-- 
Raymond H. Chui
NSWC N62
10901 New Hampshire Ave.
Silver Spring, MD 20903-5000
U.S.A.
Voice:1-301-394-5192 Fax:1-301-394-5835
E-Mail:rchui@nswc-wo.nswc.navy.mil
 _ __                                  _    ,    __
' )  )                           /    ' )  /    /  ) /
 /--' __. , , ____   ______   __/      /--/    /    /_  . . o
/  \_(_(_(_/_/) ) )_(_) /) )_(_(_     /  ( o  (__/ / /_(_/_(_
          /
         '
Newsgroups: soc.culture.hongkong