Fcitx

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Fcitx and the translation is 100% complete.
Other languages:
Resources

Fcitx (Flexible Context-aware Input Tool with eXtension support) [ˈfaɪtɪks] は 多数の言語や文字をサポートするインプットメソッドフレームワークです。

インストール

USE フラグ

USE flags for app-i18n/fcitx Fcitx 5 is a generic input method framework

X Add support for X11
autostart Enable XDG-compatible autostart of Fcitx
cairo Enable support for the cairo graphics library
debug Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
doc Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
emoji Enable emoji loading for CLDR
enchant Enable Enchant backend (using app-text/enchant) for spelling hinting
gtk2 Install input method module for GTK+ 2
gtk3 Install input method module for GTK+ 3
introspection Add support for GObject based introspection
keyboard Enable key event translation with XKB and build keyboard engine
lua Enable Lua scripting support
nls Add Native Language Support (using gettext - GNU locale utilities)
opencc Enable OpenCC engine (using app-i18n/opencc) for converter between Simplified Chinese and Traditional Chinese
pango Enable support for x11-libs/pango
presage Enable presage for word predication (not stable)
server Build a fcitx as server, disable this option if you want to use fcitx as an embedded library
systemd Enable use of systemd-specific libraries and features like socket activation or session tracking
table Install table input methods for Simplified Chinese
test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
wayland Enable dev-libs/wayland backend
xkb Enable support for XKB (required for fcitx-xkb, fcitx-xkbdbus, part of fcitx-keyboard)

メモ
該当するツールキットを使用するアプリケーションがインストールされている場合、gtk2 または gtk3 USE フラグを追加することを強くお勧めします。

Emerge

root #emerge --ask app-i18n/fcitx

Fcitx を使う

X で fcitx を使うには、以下の環境変数をスタートアップファイルに追加して export する必要があります:

X サーバーの起動に LightDM のようなログインマネージャーを使っている場合は ~/.xprofile ファイルに追加します。ログインに startx コマンドや SLiM を使っている場合は ~/.xinitrc ファイルに追加します。

インストールの際に使った USE フラグが gtk2 または gtk3 なら (以下の例の) <module>fcitx に、それ以外の場合は xim になります。

ファイル ~/.xprofile
export XMODIFIERS="@im=fcitx"
export QT_IM_MODULE=<module>
export GTK_IM_MODULE=<module>

覚えておいてください、X サーバーの起動に startx または SLiM を使用している場合のみ、~/.xinitrc を以下の例のようにします:

ファイル ~/.xinitrc
export XMODIFIERS="@im=fcitx"
export QT_IM_MODULE=<module>
export GTK_IM_MODULE=<module>

KDE Plasma: もしこれらの環境変数が~/.xprofile~/.xinitrcから読み込まれない場合、それらを~/.config/plasma-workspace/env/fcitx.shのようなPlasmaスタートアップスクリプトに追加してみてください。

Fcitx が起動する前に D-Bus セッションバスを起動することをお勧めします。これらを X のスタートアップファイル (~/.xprofile または ~/.xinitrc) の最初に追加してください:

ファイル ~/.xprofile or ~/.xinitrc
eval "$(dbus-launch --sh-syntax --exit-with-session)"
ファイル ~/.xinitrc
eval "$(dbus-launch --sh-syntax --exit-with-session)"
警告
X で Fcitx を使いたい場合、システムロケールCPOSIX にすることはできません

設定

~/.config/fcitx/config にある Fcitx の設定ファイルを編集してください

Fcitx を設定するための GUI ツールもあります。使用するには app-i18n/fcitx-configtool (GTK2 または GTK3 ベース) または app-i18n/kcm-fcitx (KDE ベース) をインストールしてください。

フロントエンド

組み込みのクラシック UI 以外に、Kimpanel と呼ばれる KDE にうまく統合するフロントエンド (kde-plasma/kdeplasma-addons に含まれています) もあります。Kimpanel を使うには dbus フラグが有効になっている必要があります。インストールが終わったら、kimpanel plasmoid を plasma パネルに追加すれば fctix は自動的にそちらに切り替わります。

特定の言語のサポート

中国語

拼音のサポートは Fcitx 自体に組み込まれています。table USE フラグを有効にすると五筆や自然码など複数の table ベースのインプットメソッドが提供されます。

より良い候補語リストの結果を得るには app-i18n/fcitx-cloudpinyin をインストールしてください。

組み込みの拼音は単純なアルゴリズムを使用しており、異なるアルゴリズムを使用する他の拼音インプットメソッドがあります。それらを使うには app-i18n/fcitx-libpinyin または app-i18n/fcitx-rime をインストールしてください。

ボポモフォ(訳註: 注音符号のこと)をサポートするには、app-i18n/fcitx-chewingapp-i18n/fcitx-libpinyin をインストールできます。

倉頡や嘸蝦米をサポートするには app-i18n/fcitx-table-extra をインストールします。

日本語

メモ
こちらも参照ください: 日本語を使った読み書きの方法 — 非日本語環境でどのように日本語を読み書きするか説明します。

app-i18n/fcitx-anthy をインストールします:

root #emerge --ask app-i18n/fcitx-anthy

韓国語

app-i18n/fcitx-hangul をインストールします:

root #emerge --ask app-i18n/fcitx-hangul

ベトナム語

app-i18n/fcitx-unikey をインストールします:

root #emerge --ask app-i18n/fcitx-unikey