出口先生のホームページを参考に
Tgifをダウンロード
Tgifのソースファイルを/usr/local/srcに移動させる
xmkmfがうまく使用できず,
下記のコマンドで行う.
# ./configure # make # make install # mkdir /usr/local/lib/X11/app-defaults # cp /usr/local/lib/X11/tgif/tgif.Xdefaults /usr/local/lib/X11/app-defaults/Tgif # vim /usr/local/lib/X11/app-defaults/Tgif
ここまでで, Tgif自体は使用可能になる.
以下では, 日本語の表示及び入力を可能にする.
/usr/local/lib/X11/app-defaults/Tgifの変更内容
L382-401, 427, 429 をコメントアウトを解除
Tgif.SquareDoubleByteFonts: \n\ -jis-fixed-medium-r-*--%d-*-*-*-*-*-jisx0208.1983-*,H,Ryumin-Light-EUC-H\n\ -jis-fixed-medium-r-*--%d-*-*-*-*-*-jisx0208.1983-*,H,Ryumin-Light-EUC-H\n\ -jis-fixed-medium-r-*--%d-*-*-*-*-*-jisx0208.1983-*,H,Ryumin-Light-EUC-H\n\ -jis-fixed-medium-r-*--%d-*-*-*-*-*-jisx0208.1983-*,H,Ryumin-Light-EUC-H\n\ \n\ -jis-fixed-medium-r-*--%d-*-*-*-*-*-jisx0208.1983-*,H,GothicBBB-Medium-EUC-H\n\ -jis-fixed-medium-r-*--%d-*-*-*-*-*-jisx0208.1983-*,H,GothicBBB-Medium-EUC-H\n\ -jis-fixed-medium-r-*--%d-*-*-*-*-*-jisx0208.1983-*,H,GothicBBB-Medium-EUC-H\n\ -jis-fixed-medium-r-*--%d-*-*-*-*-*-jisx0208.1983-*,H,GothicBBB-Medium-EUC-H\n\ \n\ -jis-fixed-medium-r-*--%d-*-*-*-*-*-jisx0208.1983-*,V,Ryumin-Light-EUC-V\n\ -jis-fixed-medium-r-*--%d-*-*-*-*-*-jisx0208.1983-*,V,Ryumin-Light-EUC-V\n\ -jis-fixed-medium-r-*--%d-*-*-*-*-*-jisx0208.1983-*,V,Ryumin-Light-EUC-V\n\ -jis-fixed-medium-r-*--%d-*-*-*-*-*-jisx0208.1983-*,V,Ryumin-Light-EUC-V\n\ \n\ -jis-fixed-medium-r-*--%d-*-*-*-*-*-jisx0208.1983-*,V,GothicBBB-Medium-EUC-V\n\ -jis-fixed-medium-r-*--%d-*-*-*-*-*-jisx0208.1983-*,V,GothicBBB-Medium-EUC-V\n\ -jis-fixed-medium-r-*--%d-*-*-*-*-*-jisx0208.1983-*,V,GothicBBB-Medium-EUC-V\n\ -jis-fixed-medium-r-*--%d-*-*-*-*-*-jisx0208.1983-*,V,GothicBBB-Medium-EUC-V Tgif.HKUShowFontChar: \244\244 Tgif.MSungGBKShowFontChar: \271\372 Tgif.GBZenKaiShowFontChar: \271\372 Tgif.RyuminShowFontChar: \244\242 Tgif.GothicBBBShowFontChar: \244\316 Tgif.ShanHeiSunShowFontChar: \244\244 Tgif.ZenKaiShowFontChar: \244\244 !Tgif.DoubleByteInputMethod: xcin !Tgif.DoubleByteInputMethod: chinput Tgif.DoubleByteInputMethod: kinput2 !Tgif.DoubleByteInputMethod: tgtwb5,-taipei-fixed-medium-r-normal--16-150-75-75-c-160-big5-0 !Tgif.DoubleByteInputMethod: tgchgb,-isas-fangsong ti-medium-r-normal--16-160-72-72-c-160-gb2312.1980-0 !Tgif.DoubleByteInputMethod: xim ! ! If Tgif.DoubleByteInputMethod is set to kinput2 or xim and you are mainly ! operated in a Japanese environment, please try the following settings: ! ! Please note that the environment variables LANG and XMODIFIERS override the ! Tgif.Lang and Tgif.Modifiers X defaults. ! Tgif.UseNKF: true Tgif.CopyAndPasteJIS: true Tgif.PreeditType: root !Tgif.PreeditType: overthespot !Tgif.Lang: ja_JP.EUC Tgif.Lang: ja_JP.ujis !Tgif.Modifiers: false Tgif.ConvSelection: _JAPANESE_CONVERSION
日本語使いたいとき( 表示だけ )は, 以下の様する.
$ env XAPPLRESDIR=/usr/local/lib/X11/app-defaults tgif
日本語入力はkinput2とcannaを組み合わせて行う.
Homebrewでは, 2つともなくめんどくさいのでMacPortsを導入
kinput2をインストールするとcannaもインストールされる.
$ sudo port -d install kinput2
cannaはサーバなのでmacportsで自動起動する様にする.
$ sudo port -d load canna
日本語は, Ctrl-Spaceで入力できる.
エイリアスにでもすべきか?
$ kinput2 -canna & $ env XAPPLRESDIR=/usr/local/lib/X11/app-defaults tgif
追記7/30
エイリアスに以下を追加し, tgifで全てが起動できるようにした.
なお, tgifはウィンドウを消せば, プロセスが終了するが,
kinput2は消えないので, killコマンドで消すのを忘れないように.
alias tgif="kinput2 -canna &;env XAPPLRESDIR=/usr/local/lib/X11/app-defaults tgif &"
[ad#ad-1]
最近のコメント