CentOS への FontForge のインストール

ここRicty の本拠地だけど、今は出来上がった状態でのフォントを配布しておらず、自分でフォントを組み立て(?)なければいけないらしい。

それに必用なのが FontForge というソフトウェア。
Mac な人達のレポートを読むと MacPorts 等でインストールしているのだけど、自分はどれも導入していないので VMWare Fusion 3.1.3CentOS 5.6 に FontForge をインストールしてフォントを組み立てることにした。

さっくりと yum でインストール…

[paraches@localhost ~]$ sudo yum install fontforge
[sudo] password for paraches: 
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
Setting up Install Process
No package fontforge available.
Nothing to do
[paraches@localhost ~]$ 

え? CentOS 用はないの???


リポジトリ云々で見つかりそうだけど、せっかくだから最新バージョンを自分でビルドしてみよう。
どうせフォントのマージをするだけだろうから、大した依存はないだろうし。

[paraches@localhost myTest]$ wget http://sourceforge.net/projects/fontforge/files/fontforge-source/fontforge_full-20110222.tar.bz2/download
[paraches@localhost myTest]$ tar jxvf fontforge_full-20110222.tar.bz2 
[paraches@localhost myTest]$ cd fontforge-20110222/
[paraches@localhost fontforge-20110222]$ ls
AUTHORS              aclocal.m4            gdraw
INSTALL              config.guess          gutils
LICENSE              config.sub            inc
Makefile.dynamic.in  configure             install-sh
Makefile.static.in   configure.dynamic     ltmain.sh
Packaging            configure.dynamic.in  plugins
README-MS.html       configure.in          po
README-Mac.html      configure.static      pycontrib
README-Unix.html     configure.static.in   pyhook
README-unix          descrip.mms           systemspecific.in
Unicode              fontforge
VERSION              fontforge.pc.in
[paraches@localhost fontforge-20110222]$ 

README-Unix.html に configure について書いてあった。configure --without-x
で X 無しでビルドできるらしい。今回は単純にコマンドラインで使うだけだからこれで良いだろう。

[paraches@localhost fontforge-20110222]$ ./configure --without-x
<省略>
 *******************************************************************
 * This version of fontforge will only run scripts. No X libraries *
 * (or X include files or some such) were found so there is NO user*
 * interface!!!!! If you want a UI try installing X11 on your      *
 * system.                                                         *
 * Caveat: You will probably need to install two packages, the     *
 *  base X11 package and the developer SDK package                 *
 *******************************************************************
[paraches@localhost fontforge-20110222]$ 

ちゃんと最後にスクリプトだけだよって出てきた。
それじゃ make&make install に挑戦。

[paraches@localhost fontforge-20110222]$ make
[paraches@localhost fontforge-20110222]$ sudo make install
[paraches@localhost fontforge-20110222]$ which fontforge
/usr/local/bin/fontforge
[paraches@localhost fontforge-20110222]$ fontforge
Copyright (c) 2000-2011 by George Williams.
 Executable based on sources from 13:48 GMT 22-Feb-2011.
 Library based on sources from 13:48 GMT 22-Feb-2011.
>>> quit()
[paraches@localhost fontforge-20110222]$ 

無事、インストール完了!

Ricty フォントを作る

Ricty 用のフォルダを作って

[paraches@localhost fontforge-20110222]$ mkdir ~/myTest/Ricty
[paraches@localhost fontforge-20110222]$ cd ~/myTest/Ricty/

必用なファイルをダウンロードして展開。
まずは Ricty。(ダウンロード

[paraches@localhost Ricty]$ wget http://save.sys.t.u-tokyo.ac.jp/~yusa/fonts/ricty/Ricty-3.0.2.tar.gz
[paraches@localhost Ricty]$ tar zxvf Ricty-3.0.2.tar.gz 
Ricty-3.0.2/ricty_discord_patch.pe
Ricty-3.0.2/ricty_generator.sh
[paraches@localhost Ricty]$ 

次に Inconsolataダウンロード

[paraches@localhost Ricty]$ wget http://levien.com/type/myfonts/Inconsolata.otf

最後に Migu 1M。(ダウンロード

[paraches@localhost Ricty]$ wget http://sourceforge.jp/frs/redir.php?m=jaist&f=%2Fmix-mplus-ipa%2F51978%2FMigu-1M-20110514.zip
[paraches@localhost Ricty]$ unzip Migu-1M-20110514.zip

Inconsolata の .otf ファイルと Migu 1M の .ttf ファイルを Ricty-3.0.2 フォルダへ移動して生成開始!

[paraches@localhost Ricty]$ mv Inconsolata.otf Ricty-3.0.2
[paraches@localhost Ricty]$ mv Migu-1M-20110514/*.ttf Ricty-3.0.2
[paraches@localhost Ricty]$ cd Ricty-3.0.2
[paraches@localhost Ricty-3.0.2]$ ls
Inconsolata.otf   Migu-1M-regular.ttf     ricty_generator.sh
Migu-1M-bold.ttf  ricty_discord_patch.pe
[paraches@localhost Ricty-3.0.2]$ sh ricty_generator.sh auto
<省略>
Succeeded to generate Ricty!
[paraches@localhost Ricty-3.0.2]$ 

1分程で終わっちゃったけど…。良いのかな?

Ricty フォントをターミナルで確認してみる

で、ファイルをコピーして fc-chache コマンド

[paraches@localhost Ricty-3.0.2]$ sudo cp Ricty-Regular.ttf /usr/share/fonts/japanese/TrueType/
[paraches@localhost Ricty-3.0.2]$ sudo cp Ricty-Bold.ttf /usr/share/fonts/japanese/TrueType/
[paraches@localhost Ricty-3.0.2]$ fc-cache -vf
/usr/share/fonts: caching, 0 fonts, 7 dirs
/usr/share/fonts/bitmap-fonts: caching, 31 fonts, 0 dirs
/usr/share/fonts/bitstream-vera: caching, 10 fonts, 0 dirs
/usr/share/fonts/default: caching, 0 fonts, 2 dirs
/usr/share/fonts/default/Type1: caching, 35 fonts, 0 dirs
/usr/share/fonts/default/ghostscript: caching, 8 fonts, 0 dirs
/usr/share/fonts/dejavu-lgc: caching, 21 fonts, 0 dirs
/usr/share/fonts/ja: caching, 0 fonts, 1 dirs
/usr/share/fonts/ja/TrueType: caching, 2 fonts, 0 dirs
/usr/share/fonts/japanese: caching, 0 fonts, 2 dirs
/usr/share/fonts/japanese/TrueType: caching, 4 fonts, 0 dirs
/usr/share/fonts/japanese/misc: caching, 84 fonts, 0 dirs
/usr/share/fonts/liberation: caching, 12 fonts, 0 dirs
/usr/share/X11/fonts/Type1: caching, 29 fonts, 0 dirs
/usr/share/X11/fonts/OTF: skipping, no such directory
/home/paraches/.fonts: skipping, no such directory
/var/cache/fontconfig: not cleaning unwritable cache directory
/home/paraches/.fontconfig: cleaning cache directory
fc-cache: succeeded
[paraches@localhost Ricty-3.0.2]$ 

ターミナルで Ricty を選択してみる。
デフォルトのフォント(monospace)の12pt。

Ricty の12pt。

Ricty の方が全体的に大きくなってる。
サイズの違いもあるけど、全体的に視認し易い。

Mac OS X へ Ricty フォントをコピーして使ってみる

VMWare FusionCentOS 5.6 で確認はできたので、後は Mac OS X 側へフォントをコピー。

フォントをダブルクリックすると「Font Book」アプリケーションが起動するので「フォントをインストール」ボタンをクリックしてインストール。

Regular と Bold それぞれをインストールするとこんな感じになる。

後は使いたいアプリケーションでフォントを選択すれば OK!