Is it possible to view Japanese (or more generally, international) fonts in emacs without running X11?

If yes, what is the process?

Nearly all the references I have found on the internet related to international fonts refer to the X11 system, but I am wondering if that is necessary.

I do not have X11 running because the computer is very old and I don't want to push it any more than is absolutely necessary. It is running OpenBSD 5.7.

When I try to view the Japanese text in emacs, only garbled text comes up regardless of the character-encoding I use to read the file with the revert-buffer-with-coding-system command. (OK, in fairness sometimes the hex codes are shown)

When I put the cursor over the character and type C-u C-x = to view character information, it says preferred charset: japanese-jisx0208, but the character is displayed as some strange international "a" with a couple accents on it.

Originally, only question marks were being displayed for the Japanese characters, but I changed that by setting my locale to use ja_JP.UTF-8 as the LC_CTYPE with export LC_CTYPE=ja_JP.UTF-8. The text now is mostly just various a's and e's with varying accents.

The output of locale is as follows:

$> locale

I also installed several japanese font packages:

$> pkg_info | grep ja
anthy-9100hp0       japanese input method
ibus-anthy-1.5.4    japnese input engine for ibus
ja-fonts-gnu-1.2p0  extra japanese fonts
ja-mplus-ttf-20060520p2    high quality japanese truetype fonts
ja-sazanami-ttf-20040629p2 japanese true type fonts

However, still no Japanese text is being displayed.

If anyone is interested, the sample Japanese document I am using is the __init__.py file from the jctconv python module.

Is there any way I can make this work without using X11?

1 Answer 1


I don't think the OpenBSD console supports fonts for multibyte encodings. In principle it might be possible to support them in relation to the recent drm(4) code, but I don't think anybody is working on that. You might want to ask on an OpenBSD list for an authoritative answer.

  • Ok, so if it doesn't work in the base console, does that mean it wouldn't work in emacs also? Without x11 is everything limited to the font display limits of the base system?
    – hilcharge
    Jun 30, 2015 at 15:42
  • @hilcharge How do you plan to run Emacs?
    – lcd047
    Jun 30, 2015 at 15:47
  • Through the base console.. good point. I think my understanding of how output and fonts are processed is lacking, but I will a deeper look at drm to try to understand Thanks for the help!
    – hilcharge
    Jun 30, 2015 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.