作ってみた!ラズパイガジェット達はこちら

コマンドでRaspbianに日本語フォントのインストールする方法

広告
インストール(install)

Raspberry Pi のOSに公式のRaspbianがあります。Debianを元にされた使いやすいOSです。

もしもあなたが日本語のフォントを追加でインストールしたい場合、GUIでもCUIの環境でもターミナル端末のコマンドでインストールするやり方を載せておきます。ご参考にしてください。

実際のコマンド

どんなフォントがあるのか検索してみます。

sudo apt-cache search font japanese

私の環境下で以下のように大量に検索結果が出ました。(stretch)

バージョン確認コマンド

lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.4 (stretch)
Release: 9.4
Codename: stretch

検索結果

cmap-adobe-japan1 – CMaps for Adobe-Japan1
cmap-adobe-japan2 – CMaps for Adobe-Japan2
debiandoc-sgml – DebianDoc SGML DTD and formatting tools
dvi2ps-fontdata-three – Font data of Adobe Japanese fonts (futomin, futogo, jun101)
dvips-fontdata-n2bk – Virtual font data to process dvi files generated by NTT-JTeX
emacs-intl-fonts – fonts to allow multilingual PostScript printing from Emacs
fbterm – fast framebuffer based terminal emulator for Linux
fonts-aoyagi-kouzan-t – Brush-style Japanese font
fonts-aoyagi-soseki – Brush-style Japanese font, Aoyagi-Soseki
fonts-arphic-ukai – “AR PL UKai” Chinese Unicode TrueType font collection Kaiti style
fonts-arphic-uming – “AR PL UMing” Chinese Unicode TrueType font collection Mingti style
fonts-dejima-mincho – antique-looking Japanese TrueType Mincho font
fonts-droid-fallback – handheld device font with extensive style and language support (fallback)
fonts-hanazono – Japanese TrueType mincho font by KAGE system and FontForge
fonts-horai-umefont – Japanese TrueType font, Ume-font
fonts-ipaexfont – Japanese OpenType font, all IPAex Fonts
fonts-ipaexfont-gothic – Japanese OpenType font, IPAex Gothic Font
fonts-ipaexfont-mincho – Japanese OpenType font, IPAex Mincho Font
fonts-ipafont – Japanese OpenType font set, all IPA Fonts
fonts-ipafont-gothic – Japanese OpenType font set, IPA Gothic and IPA P Gothic Fonts
fonts-ipafont-mincho – Japanese OpenType font set, IPA Mincho and IPA P Mincho Fonts
fonts-ipamj-mincho – Japanese OpenType font, IPAmj Mincho Font
fonts-kanjistrokeorders – font to view stroke order diagrams for Kanji, Kana and etc
fonts-kiloji – Japanese Truetype font like longhand made by “kilo”
fonts-kouzan-mouhitsu – Brush-style Japanese font, Kouzan-Mouhitsu
fonts-migmix – High quality Japanese font based on M+ fonts and IPA fonts
fonts-misaki – Japanese Gothic and Mincho font from “Misaki” bitmap font
fonts-mona – Japanese TrueType font for 2ch ASCII art
fonts-monapo – Japanese TrueType font, Monapo
fonts-motoya-l-cedar – Japanese Truetype font, Motoya L Cedar
fonts-motoya-l-maruberi – Japanese Truetype font, Motoya L Maruberi
fonts-mplus – M+ sans serif fonts with different weights
fonts-noto – metapackage to pull in all Noto fonts
fonts-noto-cjk – “No Tofu” font families with large Unicode coverage (CJK)
fonts-noto-hinted – “No Tofu” font families with large Unicode coverage (hinted)
fonts-noto-mono – “No Tofu” monospaced font family with large Unicode coverage
fonts-noto-unhinted – “No Tofu” font families with large Unicode coverage (unhinted)
fonts-oradano-mincho-gsrr – Retro style (Meiji period) Japanese font
fonts-sawarabi-gothic – gothic font for Japanese
fonts-sawarabi-mincho – Japanese mincho font – Sawarabi Mincho font
fonts-seto – handwriting Japanese font including JIS X 0213 kanji
fonts-takao – Japanese TrueType font set, Takao Fonts
fonts-takao-gothic – Japanese TrueType font set, Takao Gothic Fonts
fonts-takao-mincho – Japanese TrueType font set, Takao Mincho Fonts
fonts-umeplus – Japanese TrueType gothic fonts, based on Umefont and M+Font
fonts-vlgothic – Japanese TrueType font from Vine Linux
fonts-wqy-microhei – Sans-serif style CJK font derived from Droid
fonts-wqy-zenhei – “WenQuanYi Zen Hei” A Hei-Ti Style (sans-serif) Chinese font
fonts-yozvox-yozfont – Japanese proportional Handwriting OpenType font
fonts-yozvox-yozfont-antique – Japanese proportional Handwriting OpenType font (antique kana)
fonts-yozvox-yozfont-cute – Japanese proportional Handwriting OpenType font (cute kana)
fonts-yozvox-yozfont-edu – Japanese proportional Handwriting OpenType font (educational cana)
fonts-yozvox-yozfont-new-kana – Japanese proportional Handwriting OpenType font (new kana)
fonts-yozvox-yozfont-standard-kana – Japanese proportional Handwriting OpenType font (standard kana)
gs-cjk-resource – Resource files for gs-cjk, ghostscript CJK-TrueType extension
hershey-fonts-data – Hershey vector fonts collection
konfont – Public domain japanese fonts for KON2
langdrill – language drills to test vocabulary
latex-cjk-japanese – Japanese module of LaTeX CJK
latex-cjk-japanese-wadalab – type1 and tfm DNP Japanese fonts for latex-cjk
makejvf – generate VF file from japanese TeX TFM file for dvips
poppler-data – encoding data for the poppler PDF rendering library
printer-driver-cjet – printer driver for Canon LBP laser printers
texlive-lang-cjk – TeX Live: Chinese/Japanese/Korean (base)
texlive-lang-japanese – TeX Live: Japanese
texlive-metapost – TeX Live: MetaPost and Metafont packages
ttf-kochi-gothic – Kochi Subst Gothic Japanese TrueType font without naga10
ttf-kochi-mincho – Kochi Subst Mincho Japanese TrueType font without naga10
ttf-sazanami-gothic – Sazanami Gothic Japanese TrueType font (legacy)
ttf-sazanami-mincho – Sazanami Mincho Japanese TrueType font (legacy)
xfonts-a12k12 – 12-dot Kanji & ASCII fonts for X
xfonts-ayu – Gothic 18/20 dot Japanese and ISO-8859-1 X11 bitmap fonts
xfonts-intl-japanese – international fonts for X – Japanese
xfonts-intl-japanese-big – international fonts for X – large Japanese
xfonts-jisx0213 – JIS X 0213 Japanese Kanji bitmap fonts for X
xfonts-kaname – Kaname Cho 12 dot Japanese Kanji, Latin 1 fonts for X11
xfonts-kappa20 – X11 Kappa 20dot Fonts (ISO-8859-1..4/9/10/13..16, Japanese) with bold
xfonts-marumoji – Roundish fonts (marumoji fonts) for X
xfonts-mplus – M+ bitmap 10/12 dot Latin/Japanese fonts for X11
xfonts-shinonome – Various 12,14,16 dot Japanese Kanji, iso8859-1 fonts for X11
xfonts-wqy – WenQuanYi Bitmap Song CJK font for X
fonts-ipafont-nonfree-jisx0208 – Japanese TrueType font, IPAfont (JISX0208)
fonts-ipafont-nonfree-uigothic – Japanese TrueType font, IPAfont UI Gothic
fonts-mikachan – handwritten Japanese Truetype font
ttf-kochi-gothic-naga10 – Kochi Subst Gothic Japanese TrueType font with naga10 (non-free)
ttf-kochi-mincho-naga10 – Kochi Subst Mincho Japanese TrueType font with naga10 (non-free)
xfonts-naga10 – 10×10 dot Japanese and ISO-8859-1 naga10 fonts

定評のあるnotoに絞ってみましょう

sudo apt-cache search font japanese | grep noto

fonts-noto – metapackage to pull in all Noto fonts
fonts-noto-cjk – “No Tofu” font families with large Unicode coverage (CJK)
fonts-noto-hinted – “No Tofu” font families with large Unicode coverage (hinted)
fonts-noto-mono – “No Tofu” monospaced font family with large Unicode coverage
fonts-noto-unhinted – “No Tofu” font families with large Unicode coverage (unhinted)

フォントのインストールコマンド

notoの場合

sudo apt-get install fonts-noto

 

最後に

コマンドでの作業は難しいと思いがちです。覚えるのは難しいですが、よく使うコマンドを実際によく使えば自然と覚えていきます。

ターミナル端末には補完機能があります。

入力途中でtabキーを押せば続きを補完してくれます。候補がある場合は表示もしてくれます。スペルを間違えればエラー音で補完されません。

 

使わないと忘れてしまうので、積極的にコマンド操作すると、マウス操作よりも簡単ですよ。