Subject: Re: help for cxterm

From: Mark Sitkowski <[email-masked]>
Date: Wed, 8 May 1996 10:09:57 +22324924

>
> Hallo, friends, I have installed cxterm under Linux. But I can not get
> the different input methode. I have even copied th CXterm file under
> my home directory. But the cxterm know only F1 and F2. Becaus I know
> little of unix, could sb give me some instructions to solve this?
>
> Thanks in advance
>
> Jadin
>
Let's assume that you compiled it correctly, and that you have all the
correct dictionaries. If not, then you need to run the utility tit2cit
on whichever dictionary you'd like it to use. Here's a shell script
which does them all:

for file in `ls *.tit`
do
root=`echo $file|sed '/\.tit/s///'`
echo "Creating $root.cit from $file..."
 ../../utils/tit2cit < $file > $root.cit
done
echo Done

Now you need to make cxterm aware of all these. Edit CXterm.ad, and put
in a path to where you keep your dictionaries, and which fonts to use
as default:

cxterm*HanziEncoding:       GB
cxterm*hanziInputDir:       /home/acci/marks/zhongwen/cxterm-5.0/dict/gb
cxterm*hanziAssociation:    simple.lx
cxterm*hanziFont:       beijing24
cxterm*hanziBoldFont:
cxterm*font:            lucidasanstypewriter-bold-18
cxterm*boldFont:
cxterm*fontMenu.Label:      VT Fonts
cxterm*fontMenu*fontdefault*Label:  Default
cxterm*fontMenu*font1*Label:    Normal Ascii
cxterm*VT100*font1:     lucidasanstypewriter-bold-18
cxterm*fontMenu*font2*Label:    Large Ascii
cxterm*VT100*font2:     12x24
cxterm*fontMenu*font3*Label:    Normal Hanzi
cxterm*VT100*font3:     Beijing24
cxterm*fontMenu*font4*Label:    Bamboo Script
cxterm*VT100*font4:     cck24
cxterm*fontMenu*font5*Label:    Large Hanzi
cxterm*VT100*font5:     ziku24
cxterm*fontMenu*font6*Label:    Fantizi
cxterm*VT100*font6:     kcm24
cxterm*fontMenu*fontescape*Label:   Escape Sequence
cxterm*fontMenu*fontsel*Label:      Selection

if you're going to use Big-5, also edit this bit:

cxtermb5*HanziEncoding:     BIG5
cxtermb5*hanziInputDir:     cxterm-5.0/dict/big5
cxtermb5*hanziAssociation:  simple.lx
cxtermb5*hanziFont:     kcm24
cxtermb5*hanziBoldFont:
cxtermb5*font:          lucidasanstypewriter-bold-18
cxtermb5*boldFont:
cxtermb5*fontMenu.Label:    VT Fonts
cxtermb5*fontMenu*fontdefault*Label:    Default
cxtermb5*fontMenu*font1*Label:  Normal Ascii
cxtermb5*VT100*font1:       lucidasanstypewriter-bold-18
cxtermb5*fontMenu*font2*Label:  Medium Ascii
cxtermb5*VT100*font2:       10x20
cxtermb5*fontMenu*font3*Label:  Large Ascii
cxtermb5*VT100*font3:       12x24
cxtermb5*fontMenu*font4*Label:  Normal Hanzi
cxtermb5*VT100*font4:       kcm24
cxtermb5*fontMenu*font5*Label:  Medium Hanzi
cxtermb5*VT100*font5:       kcm24
cxtermb5*fontMenu*font6*Label:  Large Hanzi
cxtermb5*VT100*font6:       kcm24
cxtermb5*fontMenu*fontescape*Label: Escape Sequence

Then, you need to tell your X-server where your fonts are. In your
X startup file (usually .xinitrc or .openwin-init or something), do:

xset fp+ /home/acci/marks/zhongwen/cxterm-5.0/fonts

and then tell it to read your resources file:

xrdb -merge $HOME/zhongwen/CXterm.ad

Log out, and login again, and it should work OK.

If you're unsure, type the above two lines from the command line, and
then do 'xrdb -query'. This should print every resource you set in the
CXterm.ad file.
Then do 'xset -q', which should show you  (at the bottom of the list)
something like:

Font Path:
  /usr/lib/X11/fonts/,/usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/,/usr/lib/X11/fonts/100dpi/,/usr/lib/X11/fonts/ibm850/,/home/acci/marks/zhongwen/cxterm-5.0/fonts

Make sure the path you set to your Chinese fonts is there.

I've assumed here, that you've actually got the fonts installed...?

If not, get some from your favourite archive server (allow a day or so,
as they're all so damn slow!)

Here's what I've got, to give you an idea of the files you
might like to get:

csh%[44] ls fonts.src
                 cclib.j24        hanglm24.bin     kcm14.hbf
Beijing16.0      cclib.k24        hanglm24.hbf     kcm14j.hbf
Beijing16.1      cclib.n24                         kcm24.hbf
Beijing16.2      ccs24.hbf                         kcs24j.hbf
Beijing16.hbf    cfan24.ccf
Beijing24.0      cfang24.ccf
Beijing24.1      chei24.ccf       hku-ch16.0
Beijing24.2      chinese.16       hku-ch16.1
Beijing24.hbf    chinese.16.doc   hku-ch16.2
                 chinese16.hbf    kcchin16.f00     ziku24.1
ccfs24.hbf       ckai24.ccf       kcchin16.f15     ziku24.2
cch24.hbf        csong24.ccf      kcchin24.f00     ziku24.hbf
cck24.hbf                         kcchin24.f02
cclib.24         gb24st.bin       kcchin24.f15
cclib.h24        gb24st.hbf       kck24.hbf

You need two (at least) files per font - an xxx.hbf file, which is a
description, and a xxx file, which is a bitmap. You then need to make
the fonts, using a utility called hbf2bdf/hbf2pcf, which make either
bdf or pcf files, depending on your system. I can't remember where
I got this, but if you email me, I'll send you the source code.

Here's a script for making fonts, using this utility:

for file in `ls *.hbf`
do
    new=`echo $file | sed '/hbf/s//bdf/'`
    if test -s $new
        then echo ""
    else
        echo "$file -> $new...."
        hbf/hbftobdf $file > $new
    fi
done
for file in `ls *.bdf`
do
    new=`echo $file | sed '/bdf/s//pcf/'`
    if test -s $new
        then echo ""
    else
        echo "$file -> $new...."
        bdftopcf $file > $new
    fi
done
echo Done

Hope this helps. If you still have problems, send me email, it's
worth it, cxterm is wonderful!

--
~{~{TY<{~}
Mark
~{Bs~}

 ------------------------------------------------------------------------------
 Mark Sitkowski                                               ~{P&1H?^:C~}!
 Australian Computing and Communications Institute
 723 Swanston Street
 Carlton Victoria 3053
 ------------------------------------------------------------------------------
 Phone: (613-9) 282-2530    E-mail: [email-masked]
 Fax:   (613-9) 282-2534    WWW:    http://www.acci.com.au/People/marks.html

 Home phone: (613-9) 729-0731                                ~{8xNR4r5g;0~}!
 Home fax:   (613-9) 720-1487
 ------------------------------------------------------------------------------