Fonts and Input in Japanese

Few people know, but around 2003 and 2004 I took a Japanese course. Unfortunately, nearly a decade without contact with the language made me forget most of what I learned. Now I can only recognize a few very basic words written in Hiragana or Katakana.
Today I decided to reminisce about the language, but first I needed to prepare my computer. This post is to explain how to display and type Japanese characters on GNU/Linux (more specifically on Arch Linux).
Fonts
Your computer needs appropriate fonts to display Kanji, Hiragana, and Katakana characters.
Some fonts are available in the Arch repository and AUR, but you can also install fonts found on the internet. At the end of this post, I have included links to some free fonts.
Packages in the repository:
sudo pacman -S ttf-sazanami ttf-hanazono
Packages in AUR:
for f in {otf-ipafont,ttf-vlgothic,ttf-mplus,ttf-ipa-mona,ttf-monapo}; do packer $f; done
Ready! Open a Japanese website to test your new fonts.
Input
If you don’t write much, an online Romaji (Latin characters) to Japanese converter is probably enough. Otherwise, you will need to install specific packages.
The three most common ones are: IBus, uim, and SCIM. I tested IBus and SCIM, but I will only detail the explanation of IBus, which I found to be the best.
IBus
Install ibus and ibus-anthy from the official repository:
sudo pacman -S ibus ibus-qt ibus-anthy
ibus-qt is for making ibus work with Qt/KDE programs.
Run ibus-setup:
julio@acer ~> ibus-setup
A window will appear asking to activate the ibus daemon and another to configure it. In one of the windows, the following text appears:
IBus has been started! If you cannot use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus
I skipped this step because I knew it wouldn’t work here (I use ZSH and Awesome). Instead, I simply
run ibus-daemon -drx when I want to use IBus. You can add this line to your ~/.xinitrc to make
IBus start along with X.
The configuration is quite intuitive. Just add the keyboard layouts you use to be able to switch
between them with the shortcut ctrl + space.
Links
- http://www.wazu.jp/gallery/Fonts_Japanese.html
- https://help.ubuntu.com/community/JapaneseInput
- http://kanjidict.stc.cx/hiragana.php
- https://wiki.archlinux.org/index.php/Smart_Common_Input_Method_platform
- https://wiki.archlinux.org/index.php/Input_Japanese_using_uim
- https://wiki.archlinux.org/index.php/IBus
- http://home.roadrunner.com/~computertaijutsu/jpninpt.html

I’m a Brazilian computer engineer based in Germany, passionate about tech, science, photography, and languages.
I’ve been programming for about two decades already, exploring everything from mobile apps and web development to machine learning. These days I focus on cloud SRE and data engineering.
I volunteer in the open source and Python communities, helping organize PyCon DE and PyData Berlin, mentoring, and contributing with code and translations.
On my blog, I share Linux tips, setup guides, and personal notes I’ve written for future reference. I hope others find them helpful as well. The content is available in multiple languages.
Browse my gallery for some of my photography.
Away from the keyboard, you’ll find me at concerts, playing clarinet, cycling, scuba diving, or exploring new places, cultures, and cuisines.
Always happy to connect! 🙂