ラズベリーパイを使ってみる – Ubuntuでよく使う日本語フォントの「IPAゴシック」をインストールする! –

スポンサーリンク

コンテンツ

コマンド一つでかんたんにできます!
ラズベリーパイ2で動作確認済です!ラズベリーパイ2のOSはRaspbian-jessieです。

必要なソフトのインストール

以下のコマンドを実行すると、必要なソフトがインストールできます!

sudo apt-get install fonts-ipafont

必要なソフトをインストールする時の様子

上記のコマンドを実行すると、ラズベリーパイ2で以下のように動作します!

途中で
>After this operation, (数値) kB of additional disk space will be used.
>Do you want to continue? [Y/n]
のように表示された場合、「Y」または「y」キーを押した後で【Enter】キーを押してください。
日本語に翻訳すると「このソフトウェアをインストールすると、(数値)KBの容量が使用されます。続けますか?」と質問されています。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  fonts-ipafont-gothic fonts-ipafont-mincho
The following NEW packages will be installed:
  fonts-ipafont fonts-ipafont-gothic fonts-ipafont-mincho
0 upgraded, 3 newly installed, 0 to remove and 145 not upgraded.
Need to get 8,264 kB of archives.
After this operation, 28.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main fonts-ipafont-gothic all 00303-12 [3,524 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main fonts-ipafont-mincho all 00303-12 [4,728 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main fonts-ipafont all 00303-12 [11.7 kB]
Fetched 8,264 kB in 35s (236 kB/s)        
Selecting previously unselected package fonts-ipafont-gothic.
(Reading database ... 151627 files and directories currently installed.)
Preparing to unpack .../fonts-ipafont-gothic_00303-12_all.deb ...
Unpacking fonts-ipafont-gothic (00303-12) ...
Selecting previously unselected package fonts-ipafont-mincho.
Preparing to unpack .../fonts-ipafont-mincho_00303-12_all.deb ...
Unpacking fonts-ipafont-mincho (00303-12) ...
Selecting previously unselected package fonts-ipafont.
Preparing to unpack .../fonts-ipafont_00303-12_all.deb ...
Unpacking fonts-ipafont (00303-12) ...
Processing triggers for fontconfig (2.11.0-6.3) ...
Setting up fonts-ipafont-gothic (00303-12) ...
update-alternatives: using /usr/share/fonts/opentype/ipafont-gothic/ipag.ttf to provide /usr/share/fonts/truetype/fonts-japanese-gothic.ttf (fonts-japanese-gothic.ttf) in auto mode
Setting up fonts-ipafont-mincho (00303-12) ...
update-alternatives: using /usr/share/fonts/opentype/ipafont-mincho/ipam.ttf to provide /usr/share/fonts/truetype/fonts-japanese-mincho.ttf (fonts-japanese-mincho.ttf) in auto mode
Setting up fonts-ipafont (00303-12) ...

実行時の様子

ラズベリーパイ2のlibreoffice Writerを起動し、フォント一覧を表示するとIPAGothic(IPAゴシック)のような、日本語の表示に使用できるフォントが追加されています。
Screenshot from 2016-02-18 12:16:29_001

解説

IPAゴシックはUbuntuなどのLinuxでよく使われている日本語を表示するためのフォントです。フォントとは、文字をパソコンに表示するためのものでWindowsだとよく「MS明朝」などが使用されます。

ラズベリーパイ2で日本語の文章を作成するときの参考になると幸いです!