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
LANG=
LC_COLLATE="C"
LC_CTYPE=ja_JP.UTF-8
LC_MONETARY="C"
LC_TIME="C"
...
LC_MESSAGES="C"
LC_ALL=
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?