VLゴシックで矢印記号が半角幅

Ubuntu 9.10 でエディタ等で VLゴシックフォントを使用すると、←↓↑→が半角幅になります。

f:id:tmtms:20091204214036p:image

ユニコードの Ambiguous Width の問題かと色々調べてたんですが、別のフォントでは問題ないことから VLゴシックフォント自体に問題があるのではないかと思い至りました。

TrueType フォントを編集できるツールを探すと、fontforge というのが見つかったのでインストールしてみます。

~% apt-cache search truetype edit
fontforge - Font editor for PS, TrueType and OpenType fonts
libfontforge-dev - runtime library (development files) for FontForge
libfontforge1 - runtime library for FontForge
fontforge-extras - Additional data and utilities for FontForge
fontforge-nox - Font editor for PS, TrueType and OpenType fonts
goby - WYSIWYG presentation tool for Emacs
mensis - Editor for some TrueType/OpenType font tables
ttf-aenigma - 465 free TrueType fonts by Brian Kent
unifont-bin - utilities for manipulating the GNU Unifont
~% sudo aptitude install fontforge
...

次ようにして起動します。

% fontforge /usr/share/fonts/truetype/vlgothic/VL-Gothic-Regular.ttf

U+2190 から4つが「←↑→↓」です。

f:id:tmtms:20091204212827p:image

「←」をダブルクリックすると次のようなウィンドウが開きます。幅が 500 になってます。ほかの全角文字は 1000 のようです。

f:id:tmtms:20091204212828p:image

ということで、枠を 1000 まで伸ばします。中のデータも適当に伸ばします。

f:id:tmtms:20091204212829p:image

矢印を4つとも変更したらメニューバーから「ファイル」→「フォントを出力」で TrueType フォントを書き出します。

元の /usr/share/fonts/truetype/vlgothic/VL-Gothic-Regular.ttf を置き換えて、ログアウト&ログインすると反映されてます。

f:id:tmtms:20091204213139p:image