Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] unicode font with czech and japanese characters



Michal Hajek writes:

 > Which seems a bit weird sinc you write 

fc-list's interface has changed since I last used it, it looks like,
or maybe I've just spent too much time looking at font.cache-1 files.
A little experimentation suggests that the following syntax will give
you what you want:

fc-list :lang=ja:lang=cs

This selects those fonts which can handle ja *and* can handle cs, and
outputs the family name and font style.  If you want to see the
language list for all fonts, you can do this:

fc-list "" family style lang

where the null spec "" says "don't filter the fonts at all", ie, "give
me all fonts", and the last three arguments are font property names.
This probably isn't terribly useful since the language strings tend to
be about 3 lines long, and pretty unreadable.

 > So based on your claim above (Japanese fonts handle Czech)

I can refine that.  It looks like all my Mincho fonts handle Czech,
and none of the Gothic fonts do.  YMMV with other Mincho/Gothic fonts,
of course.

 > So is there any better way of selecting suitable font than going through
 > all Japanese fonts and try them? 

No, after all you have to eyeball them to decide which ones you like.

Various applications should probably give you ways to display a
particular string which contains both Japanese and Czech, for each of
a list of fonts.  I know XEmacs can do this, but I don't have the code
offhand.

 > I suppose the 16 in "Bitstream Vera Sans Mono-16" string is for
 > pointsize? 

Yes.  You may also want to use the :dpi=100 (substitute a DPI
corresponding to your monitor) parameter so that point sizes are
sensible.

 > [2] I have .Xdefaults instead .Xresources. That should not hurt
 > anything, right? 

No.  Someday there may be a version of X that ignores .Xdefaults,
though.

You can also change the faceName resource for XTerm with the -fa
command-line option.  Then something like

for i in 'Sazanami Mincho' 'Kochi Mincho'; do
  xterm -fa "$i-20" -geometry 40x5 -e my-font-thing "$i" &
done

where my-font-thing contains a shell script

#! /bin/sh

echo The font is $1
echo ""
echo "A string containing Japanese and Czech."

should pop up a bunch of windows with the string in different fonts.

Crude, rude, and should work.


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links