You are not logged in.
I recently reinstalled my arch linux system and I found that unicode and matrix font (cmatrix -l) doesnt work in rxvt-unicode. Using "cmatrix -l" in the regular tty terminal works but neither does unicode. When I try to view Japanese texts it outputs garbage. I installed the asian fonts suggested in the fonts page in the wiki.
How's my programming? Call 1-800-DEV-NULL
Offline
I'm using Inconsolata on urxvt and displaying Japanese characters works fine here.
I get
$ ls *.txt
cups-pdf_todo-tonight.txt fuser.txt 象は鼻が長いです.txt
diff_and_patch.txt keybindings_openbox.txt
I hope you are able to see the Japanese ideograms in your browser. In xterm, where I haven't set a font, I get a square for each Japanese character.
Sometimes, not correctly defining your locale with UTF-8 will have the same effect: you get unprintable characters. If you'll post the output of the commands 'locale' and 'locale -a' we can see if there's a problem there.
Offline
I'm using Inconsolata on urxvt and displaying Japanese characters works fine here.
I get
$ ls *.txt
cups-pdf_todo-tonight.txt fuser.txt 象は鼻が長いです.txt
diff_and_patch.txt keybindings_openbox.txtI hope you are able to see the Japanese ideograms in your browser. In xterm, where I haven't set a font, I get a square for each Japanese character.
Sometimes, not correctly defining your locale with UTF-8 will have the same effect: you get unprintable characters. If you'll post the output of the commands 'locale' and 'locale -a' we can see if there's a problem there.
I'm using the terminus font. Is that UTF-8 compliant? On my previous installation I remember it working. I'll give you my 'locale -a' output when I get back from school.
How's my programming? Call 1-800-DEV-NULL
Offline
Heres my 'locale -a'
zowki@craptop ~ % locale -a
C
POSIX
en_US
en_US.iso88591
en_US.utf8
How's my programming? Call 1-800-DEV-NULL
Offline
Check your LOCALE setting in /etc/rc.conf. It should exactly match
LOCALE="en_US.utf8" # Correct
The wiki article on locale says the following is not correct:
LOCALE="en_US.UTF8" # Wrong
The setting should exactly match the line from the output of 'locale -a'.
Now when i run 'locale', I get,
$ locale
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE=C
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=
You'll have to reboot for any changes you make to take effect, I think.
I just tried Terminus in both xterm and urxvt and the Japanese characters work here. From ~/.Xdefaults, for approximately 8-point type:
urxvt*font: xft:Terminus:pixelsize=13
I checked my /etc/locale.gen file. The only lines I have uncommented are:
$ grep -v "#" /etc/locale.gen
en_US.UTF-8 UTF-8
en_US ISO-8859-1
That's all the settings that I think could affect the urxvt display of CJK, other than /etc/fonts.conf settings. Tell us if anything helps.
Last edited by thisoldman (2009-10-01 10:51:14)
Offline
Nope still doesnt work. I'm trying to browse Japanese websites through elinks and it still comes up with garbage.
My locale setting:
LOCALE="en_US.utf8"
Output for "locale"
shaun@hackbox ~ % locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
My ~/.Xdefaults
xvt.buffered : true
URxvt.background : black
URxvt.foreground : green
URxvt.cursorColor : green
URxvt.underlineColor : yellow
URxvt.font : xft:Terminus:pixelsize=10:antialias=false
URxvt.perl-ext : default,matcher
URxvt.urlLauncher : /usr/bin/swiftfox
URxvt.matcher.button : 1
URxvt.title : urxvt
URxvt.scrollBar : False
How's my programming? Call 1-800-DEV-NULL
Offline
As far as I know, Terminus is not a unicode font. Judging from your .Xdefaults, you seem to let
xft choose whatever it thinks is appropriate for a CJK glyph.
You can check the output of
fc-list :lang=ja
This should give you all available Japanese font. And I think you must specify a CJK font explicitly in
your .Xdefaults. Also, rxvt-unicode will not accept fonts with bigger pixelsize than the first one you
specified.
Last edited by eirika (2009-10-01 18:48:49)
Offline
@eirika,
I see where some of my confusion about zowki's problem arises. I always have fonts available that will cover most any script in UTF-8. I installed elinks to see if I could duplicate zowki's problem. I had no problem displaying CJK at http://ja.wikipedia.org/.
$ fc-list :lang=ja
unifont:style=Regular
Arial Unicode MS:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
Code2000:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normalan,Normálne,Navadno,thường,Arrunta
Fixed:style=ko
Fixed:style=ja
Bitstream Cyberbit:style=Roman
I had surprisingly few missing characters at http://www.columbia.edu/kermit/utf8.html with elinks; none at all with Firefox. Elinks was very poor at http://crism.maden.org/dunno.html; I had no missing characters with Firefox.
To sum it up, browsing non-Latin sites with elinks is not going to be easy.
Offline
So this is how I display Japanese glyphs:
$ fc-list :lang=ja
Sazanami Mincho,さざなみ明朝:style=Regular,Mincho-Regular
Sazanami Gothic,さざなみゴシック:style=Regular,Gothic-Regular
Fixed:style=ko
Fixed:style=ja
My .Xdefaults:
URxvt.font: xft:Bitstream Vera Sans Mono:pixelsize=14,xft:Sazanami Gothic
The FAQ page of rxvt-unicode helps me a lot about how it chooses a font:
http://pod.tst.eu/http://cvs.schmorp.de … oose_fonts
Last edited by eirika (2009-10-02 01:26:38)
Offline
My output of fc-list :lang=ja
$ fc-list :lang=ja
AR PL New Sung Mono,文鼎PL新宋 Mono:style=Reguler,Regular
AR PL New Kai,文鼎PL新中楷:style=Regular
Fixed:style=ko
Fixed:style=ja
AR PL New Sung,文鼎PL新宋:style=Reguler,Regular
Is this problem with Japanese fonts related to my inability to use matrix.fnt when using "cmatrix -l"?
Edit:
I saw that you had the sazanami fonts so I tried installing that but it still doesnt work though it looks like in works in fc-list
$ fc-list :lang=ja
Sazanami Mincho,さざなみ明朝:style=Mincho-Regular,Regular
AR PL New Sung Mono,文鼎PL新宋 Mono:style=Reguler,Regular
AR PL New Kai,文鼎PL新中楷:style=Regular
Sazanami Gothic,さざなみゴシック:style=Gothic-Regular,Regular
Fixed:style=ko
Fixed:style=ja
AR PL New Sung,文鼎PL新宋:style=Reguler,Regular
Perhaps elinks doesnt have utf8 support.
Last edited by zowki (2009-10-02 01:41:39)
How's my programming? Call 1-800-DEV-NULL
Offline
I think first you can make sure that if it's an rxvt-unicode problem or not.
Do file names with CJK characters display correctly in rxvt-unicode?
If that's ture, then it must be an elinks problem.
So, say, try this
$ urxvt -fn "xft:Terminus,xft:Sazanami Mincho"
And try to display some Japanese glyphs (via ls, input method, etc., but not elinks)
and see if this works.
Also, I think elinks just works for web pages with specific encodings. For example,
it can't decode GB2312 or GBK(both are Chinese specific). UTF-8 is fine in elinks
(e.g. ja.wikipedia.org). So please check the encoding of the web pages you want to view.
You can also view the Setup menu(Setup->Character Set) in elinks to see
what encodings it accepts.
Offline
It must be a problem with google.jp. That was the site I used to test it. It works great with ja.wikipedia.org. But I still have the cmatrix -l problem. I have matrix.fnt in these locations:
/etc/fonts/matrix.fnt
/usr/share/kbd/consolefonts/matrix.fnt
It seems to only work in TTY terminals. Is it because matrix.fnt is a terminal only font?
How's my programming? Call 1-800-DEV-NULL
Offline
I have matrix.fnt in these locations:
/etc/fonts/matrix.fnt
/usr/share/kbd/consolefonts/matrix.fntIt seems to only work in TTY terminals. Is it because matrix.fnt is a terminal only font?
Here I actually have mtx font in the standard path:
$ pacman -Ql cmatrix
cmatrix /usr/
cmatrix /usr/bin/
cmatrix /usr/bin/cmatrix
cmatrix /usr/man/
cmatrix /usr/man/man1/
cmatrix /usr/man/man1/cmatrix.1.gz
cmatrix /usr/share/
cmatrix /usr/share/fonts/
cmatrix /usr/share/fonts/misc/
cmatrix /usr/share/fonts/misc/mtx.pcf
cmatrix /usr/share/kbd/
cmatrix /usr/share/kbd/consolefonts/
cmatrix /usr/share/kbd/consolefonts/matrix.fnt
cmatrix /usr/share/kbd/consolefonts/matrix.psf.gz
Note this line: /usr/share/fonts/misc/mtx.pcf
But this font doesn't present in /usr/share/fonts/misc/fonts.dir so I can't use it.
I copied this font file out into a directory and tried to add the font manually. Say:
$ cp mtx.pcf ~/.fonts
and then run these in ~/.fonts directory:
$ cd ~/.fonts
$ mkfontdir
$ xset fp+ ~/.fonts
$ fc-cache
This makes the font available to the X server. But urxvt refuses to use it:
$ urxvt -fn "mtx"
unable to deduce codeset, ignoring font 'mtx'
urxvt: unable to load base fontset, please specify a valid one using -fn, aborting.
$ urxvt -fn "xft:mtx"
urxvt: unable to calculate font width for 'mtx:minspace=True', ignoring.
urxvt: unable to load base fontset, please specify a valid one using -fn, aborting.
On the other hand xterm is happy with this font, just type in xterm -fn mtx and it works. And
cmatrix also works fine. So I think you need to do something before you can use it with urxvt.
Maybe edit it using fontforge?
Please point out if I missed something.
Last edited by eirika (2009-10-02 15:34:41)
Offline