Date: Tue, 30 Mar 2004 10:44:24 +0200 (CEST) From: Robert Klein <roklein@roklein.de> To: Stephen Liu <satimis@icare.com.hk> Cc: freebsd-openoffice@freebsd.org Subject: Chinese input (using xcin) and OpenOffice on FreeBSD Message-ID: <20040330.104424.74691423.roklein@roklein.de>
next in thread | raw e-mail | index | archive | help
[Attention: This is a cross post to both xcin@linux.org.tw and freebsd-openoffice@freebsd.org] Hi Stephen, list, [Stephen, please see below for answers to some of your other messages.] I looked into OOo and Chinese input on FreeBSD 5.2.1 and OpenOffice 1.1.0. Comments and criticism are welcome. I'm using the OpenOffice package from projects.imp.ch/openoffice in the German version.. The command pkg_info -I '*openoff*' results in: de-openoffice-1.1.0_1 Office-Suite mit Textverarbeitung, Tabellenkalkulation, Dat First of all, OpenOffice and Chinese input are independent of each other. You can use OpenOffice with or without Chinese input. At the same time you can use Chinese input with or without OpenOffice. Getting Chinese input working. ============================== I'm only covering xcin and traditional Chinese, here. I did not succed to get simplified Chinese input with fcitx running. I had no time to investigate, unfortunately. 1) Traditional Chinese input with xcin. To input Chinese characters with xcin you need to install the xcin package. You can do this using the command pkg_add -r zh-xcin to get the package from a FreeBSD package site. 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 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 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...). Now you'll have to alter the /etc/X11/XF86Config file. Add the line FontPath "/usr/local/share/fonts/TrueType" to the "Files" section. 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 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. 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 & 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. You can adjust the input method xcin starts with in the file /usr/X11R6/etc/xcinrc 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. OpenOffice ========== Now you have (traditional) Chinese input installed and running. We'll look now into getting Chinese fonts working in OpenOffice. First, we're "installing" the fontss for OpenOffice. To do this start the spadmin program: /usr/local/OpenOffice.org1.1.0/spadmin (You can probably do this as root. I'm doing it as myself, after having set up OpenOffice for myself.) [comments: There are several documents on the web, helping out: http://www.openoffice.org/FAQs/fontguide.html#5 At one time I heard/read I could not user Truetype fonts for printing whn using them via X. I don't really know much about this, but adding fonts using spadmin worked.. ] 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". That's all. 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.... ) Now you should be able to use Chinese input with xcin and OpenOffice. I'd be glad to hear reports of success (well, or failures.. :( ) ---(following answers to Stephens other messages)--- "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). PS: forget about the "fonts" package installed by xcin. I think it is solely used by xcin to display the xcin window... Regards, Robert
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040330.104424.74691423.roklein>