Date: Tue, 30 Mar 2004 23:48:07 +0800 From: Stephen Liu <satimis@icare.com.hk> To: RoKlein@roklein.de Cc: freebsd-openoffice@freebsd.org Subject: Re: Chinese input (using xcin) and OpenOffice on FreeBSD Message-ID: <200403302348.07909.satimis@icare.com.hk> In-Reply-To: <20040330.104424.74691423.roklein@roklein.de> References: <20040330.104424.74691423.roklein@roklein.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Robert, FreeBSD 5.2 OpenOffice 1.1.0 KDE 3.1.4 Xcin25 Lot of thanks for your detailed post. I have been trying for more than a week to add Chinese editing function to OOo 1.1.0 without result. Some of the steps on your advice described below have already been done but still I could not get 'Chinese editing' to work. I will work through your advice step by step again to find out the mistake committed by me and/or steps omitted by me previously in anticipation that other subscribers can be benefitted in reading this post. Relevant packages already installed as follows; Installed packages :- fontconfig-2.2.90_3 ttmkfdir-0.0_1 zh-arphicttf-2.11_1 zh-libtabe-0.2.5_1 zh-kcfonts-1.05 zh-ttfm-0.9.5 zh-xcin-2.5.3.p2_3 zh-zhcon-0.2.3_1 zh_TW-kde-i18n-3.1.4 - snip - > The command > pkg_info -I '*openoff*' > results in: I downloaded OOo1.1.0 tarball from OO website and extracted it to /usr/local/OpenOffice.org1.1.0/ Afterwards setup /usr/home/user/OpenOffice.org1.1.0/ - snip - > Due to dependencies you might get more than one package installed. Three > of those packages are from the "Chinese" section of the ports: > > zh-xcin-2.5.3.p2_3 Chinese input method server under X > zh-libtabe-0.2.5_1 Unified library for Chinese text processing > zh-kcfonts-1.05 Kuo Chauo Chinese Fonts collection # pkg_info | grep zh-xcin zh-xcin-2.5.3.p2_3 Chinese input method server under X # pkg_info | grep zh-libtabe zh-libtabe-0.2.5_1 Unified library for Chinese text processing # pkg_info | grep zh-kcfonts zh-kcfonts-1.05 Kuo Chauo Chinese Fonts collection They were already installed. > Now, you probably want a nice font for display and printing in OpenOffice. > Install the Arphic fonts using the following command: > pkg_add -r zh-arphicttf > > This installs: > zh-arphicttf-2.11_1 Four Chinese Big5/GB TrueType fonts made by Arphic > Technolo pkg_info | grep zh-arphicttf zh-arphicttf-2.11_1 Four Chinese Big5/GB TrueType fonts made by Arphic Technolo zh-arphicttf-2.11_1 has already been installed > To use those fonts under X Windows you have to tell X where they are. > Using pkg_info -L zh-arphicttf-2.11_1 > I find out, they are installed in the directory > usr/local/share/fonts/TrueType/ > (not where you'd expect...). pkg_info -L zh-arphicttf-2.11_1 ... /usr/local/share/fonts/TrueType/bkai00mp.ttf /usr/local/share/fonts/TrueType/bsmi00lp.ttf /usr/local/share/fonts/TrueType/gbsn00lp.ttf /usr/local/share/fonts/TrueType/gkai00mp.ttf /usr/local/share/fonts/TrueType/arphic/license/BIG5/ARPHICPL.DOC /usr/local/share/fonts/TrueType/arphic/license/BIG5/ARPHICPL.TXT /usr/local/share/fonts/TrueType/arphic/license/ENGLISH/ARPHICPL.DOC /usr/local/share/fonts/TrueType/arphic/license/ENGLISH/ARPHICPL.TXT /usr/local/share/fonts/TrueType/arphic/license/GB/ARPHICPL.DOC /usr/local/share/fonts/TrueType/arphic/license/GB/ARPHICPL.TXT /usr/local/share/fonts/TrueType/arphic/logo.gif /usr/local/share/fonts/TrueType/arphic/release.txt > Now you'll have to alter the /etc/X11/XF86Config file. Add the line > FontPath "/usr/local/share/fonts/TrueType" > to the "Files" section. Already added it to /etc/X11/XF86Config cat /etc/X11/XF86Config ..... Section "Files" RgbPath "/usr/X11R6/lib/X11/rgb" ModulePath "/usr/X11R6/lib/modules" FontPath "/usr/X11R6/lib/X11/fonts/misc/" FontPath "/usr/X11R6/lib/X11/fonts/Speedo/" FontPath "/usr/X11R6/lib/X11/fonts/Type1/" FontPath "/usr/X11R6/lib/X11/fonts/75dpi/" FontPath "/usr/X11R6/lib/X11/fonts/100dpi/" FontPath "/usr/local/share/fonts/TrueType/" ..... > Additionally you'll have to activate the "truetype" part of XFree. To do > this please add the line > Load "freetype" > to the "Module" section if it isn't already there. I missed this step previously ee /etc/X11/XF86Config now added Load "freetype" to Module section cat /etc/X11/XF86Config ...... Section "Module" Load "dbe" Load "dri" Load "extmod" Load "glx" Load "record" Load "xtrap" Load "speedo" Load "type1" Load "freetype" ...... Gave a hard stroke afterwards by pressing <Ctrl + Alt + Backstorke> > I think you also have to do something else, like doing a ttmkfdir or so. > Don't remember right now, best to loog for "truetype X11 install" on google > (without the quotes, of course..) > > But be that as it may... You don't need that for OpenOffice, if I recall > correctly. I went across the above before on another document and could not recall. Anyways I will search it later. What will be the use of ttmkfdir > Anyways, _if_ you get the fonts installed in X11 you can do the following > to get Chinese input in almost any program. Enter the following commands > in your favourite xterm, running bash or sh: > > XMODIFIERS=@im=xcin > LC_CTYPE=zh_TW.Big5 > export XMODIFIERS > export LC_CTYPE > /usr/X11R6/bin/xcin2.5 & $ XMODIFIERS=@im=xcin $ LC_CTYPE=zh_TW.Big5 $ export XMODIFIERS $ export LC_CTYPE $ /usr/X11R6/bin/xcin2.5 & $ XCIN (Chinese XIM server) version 2.5.3-pre2. (module ver: 20010918, syscin ver: 20000210). (use "-h" option for help) xcin: locale "zh_TW.Big5" encoding "big5" xcin: warning: invalid font BIG5-0. xcin: error: fontset setting error. xcin failed to start. Furthermore can I add * * * * * XMODIFIERS=@im=xcin LC_CTYPE=zh_TW.Big5 export XMODIFIERS export LC_CTYPE /usr/X11R6/bin/xcin2.5 & * * * * * to /etc/rc.conf to start xcin automatically at boot > For testing you can start, say, kedit. In the kedit window press > CTRL-SPACE to start chinese input. You can cycle through the > different input methods using CTRL-SPACE. On kedit window <Ctrl + Shift> did not start Chinese input > You can adjust the input method xcin starts with in the file > > /usr/X11R6/etc/xcinrc Noted with thanks. I will test it after 'xcin' started > Note: the first input method used by default is called cj in the xcinrc > file. This may be the "congji" you (Stephen) mentioned in one mail. Noted. I will test it after 'xcin' started > OpenOffice - snip - > Ok, let's continue. The font installation is also described in the > OpenOffice setup guide (page 58 in the German version, page 67 in the > English version). In short, after starting spadmin you click on "fonts", > then on "Add". In the "Add fonts" dialog enter the directory of the Arphic > fonts, "/usr/local/share/fonts/TrueType". When the list of fonts appears, > click "Select All". Check the "Create soft links only" to avoid extra > copies of the fonts in your home directory. Now click "Ok". I have done this step already, following fonts appearing on the drop-list AR PL KaitiM Big5 AR PL KaitiM GB AR PL Mingti2L Big5 AR PL SungtiL GB > Now you can configure OpenOffice to default to those fonts. > > Stat OpenOffice, enter the Tools->Options menu. There, under > "Language Settings" and then "Languages" enable Asian language support. > > Now look under "Text Document". > > If there is _no_ "folder" named "Basic Fonts (Asian)" close OpenOffice and > start it again. Go again to "Tools->Options" and "Text Document". > > Now go to "Basic Fonts (Asian)". There you can enter your default fonts > for Chinese input. I prefer a setting "AR PL KaitiM Big5" > for all Fonts, except "Heading" which I set to "AR PL Mingti2L Big5". > > (Ok, I usually use simplified fonts.... ) I have done the above steps already. The remaining problem is 'xcin' can start > "What are those packages for?" > > p5-Encode-HanConvert-0.28: looks like a perl module to assist conversion > between Traditional and Simplified Chinese texts > > zh-hc-3.0: Yes, it can convert Documents from simplified to traditional and > vice versa. It is a text mode tool, though and has no graphical user > interface. > > zh-moettf-2.0_1: Yes, it is a collection of traditional Chinese fonts. The > collection is fram the Taiwan Ministry of Education (In the US this would > be called the "Department of...", I suppose). > > zh-dictd-database-1.4: It is a dictionary database to be used with zh-dictd > (see www.dict.org for more information about dict). Noted with thanks. > PS: forget about the "fonts" package installed by xcin. I think it is > solely used by xcin to display the xcin window... I could not find them after installation completed and have no idea where they have been installed. B.Regards Stephen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403302348.07909.satimis>