Discussion:
[SM-Users] Which fonts support utf8 under X?
Javier Vasquez
2008-03-10 01:48:58 UTC
Permalink
Hi,

I like using terminus font, but somehow it doesn't support utf8. When
using gvim (I compiled it against lesstif, but with openmotif is the
same as well as with gtk+2, since I tried all, the best result is with
openmotif, which doesn't die after the warning), I get:

% vi
Warning: Unable to load any usable fontset
Vim: Caught deadly signal SEGV
Vim: Finished.
Segmentation fault

This when I have LANG set as en_US.utf8. When I have it set to
en_US.iso88591 I don't get the error. The font I'm using is:

Vim.font: -xos4-terminus-medium-*-*-*-24-*-*-*-*-*-*-*

I'm hoping I could use terminus font with en_US.utf8, although it
doesn't seem possible. Notice I see several fonts already compiled
for iso8859-1:

% xlsfonts | grep -E 'iso8859-1' | wc -l
4710

But I don't see anything already compiled for utf8:

% xlsfonts | grep -Ei 'utf' | wc -l
0

Is there a way to make available fonts support en_US.utf8 language?
Any suggestions? Please notice plain vim under xterm/aterm/mrxvt has
no problem at all.

Thanks,
--
Javier
sqweek
2008-03-11 03:07:55 UTC
Permalink
Post by Javier Vasquez
I'm hoping I could use terminus font with en_US.utf8, although it
doesn't seem possible. Notice I see several fonts already compiled
% xlsfonts | grep -E 'iso8859-1' | wc -l
4710
% xlsfonts | grep -Ei 'utf' | wc -l
0
That's because utf8 is an encoding. Fonts don't know anything about
it. You might have more luck grepping for iso10646, which is the
unicode codepage. Well, not really, but unicode and iso10646 are
compatible.
Some apps allow you to specify a list of fonts and it will use
whichever font has a glyph for the fontset it is trying to draw. I
don't know if gvim is one of them.
-sqweek

Loading...