Ibus-libpinyin
app-i18n/ibus-libpinyin is a Chinese input engine on IBus. It is similar to, and a viable alternative for Fcitx and app-i18n/fcitx-libpinyin. It is a modern replacement for the original (outdated) app-i18n/ibus-pinyin.
Installation
USE flags
USE flags for app-i18n/ibus-libpinyin Intelligent Pinyin and Bopomofo input methods based on LibPinyin for IBus
Emerge
root #
emerge --ask app-i18n/ibus-libpinyin
If you have not already installed a chinese compatible font you will need to:-
root #
emerge --ask media-fonts/arphicfonts
Additional software
This will work alongside other IBus input types (e.g. for Japanese input app-i18n/ibus-anthy )
Configuration
Open up the ibus setup dialogue
user $
ibus-setup
Check the 'Next Input Method key' and change if desired. Then switch to 'Input Method' tab and add 'Chinese -> Intelligent Pinyin'. This adds 'Chinese - Intelligent Pinyin' to the list of input methods that ibus will cycle through when you press the 'Input Method Key'. Select 'Chinese - Intelligent Pinyin' on the list and click 'Preferences' to set options as desired.
For IBus (and the chinese input) to run automatically on next login you will also need to configure as per configuration section for IBus
Usage
press the ibus 'special key' (as configured above - by default it is super+Space) and select 'Intelligent Pinyin'. Then type in pinyin to get the chinese character (type 'nihao' and if 你好 appears as 1. press space to accept)
Invocation
to manually start (IBus) for a user you can do
user $
ibus-daemon -d -x
(see IBus wiki for more info)
Troubleshooting
In xterm if get weird glyphs instead of chinese characters, but it works OK in other software (e.g. browser) you need to launch xterm with settings that can cope with double spaced characters that you get in chinese. e.g.
user $
xterm -rv -en UTF-8 -fs 10 -fa 'AR PL UMing CN:style=Regular,Regular'