more about x.org and fonts
ken at linuxfromscratch.org
Thu Jan 10 15:24:36 PST 2008
On Thu, Jan 10, 2008 at 08:47:01PM +0100, alberto hernando wrote:
> I (too) have problems with foreign fonts and x.org. I want to see Japanese
> characters in x.org-7.3, and I've followed recent discussions about this, so
> this is what I tried:
Just in case my suggestions are ineffective: did you used to have
japanese displaying correctly ? Have you just switched to using
truetype (Xft) when you went over to 7.3 ?
> My locale:
> bash-3.2$ locale
> I start X with kdm.
> bash-3.2$ fc-list
> Luxi Serif:style=Regular
> Utopia:style=Bold Italic
> Serto Malankara:style=Regular
> Luxi Serif:style=Bold
> (and more, but no Japanese).
Ah, that depends on what you are looking for. For example, a font
which I know is japanese shows up as
But I can't tell that those glyphs are japanese rather than, say,
chinese. In fact, most of my fonts don't have anything in the
output from fc-list to guide me about what they are for.
> xlsfonts: a **lot**. Amongst them,
> bash-3.2$ xlsfonts | grep ja
Legacy (the core X fonts protocol) - in general, not used by
anything which uses Xft ('truetype') fonts.
I assume you have looked at
(the part labelled 'Xft Font Protocol') and installed Kochi fonts ?
> I have this in /etc/fonts/fonts.conf:
> <!-- Font directory list -->
> And, in /usr/share/fonts, I have my directories with fonts.
> Ah, and according to another message in the list, I recompiled freetype,
> fontconfig and libxft, but with no change.
> Now, what is working and what isn't?
> kde apps can show kana but not kanji. Just in case you don't know, these are
> the 2 kinds of Japanese characters. I guess that qt/kdelibs somehow include
> kana but not kanji. Instead of kanji, the famous squares. But in firefox, I
> can nearly see everything. I can see kanji in webpages and in gmail, I can
> see them in the tabs, but I can't see them in the main window. Sorry, maybe
> this has a better name, but I mean next to the logo and 'Mozilla Firefox'.
> There, no kanji.
Not sure about firefox - By "main window" do you mean the text
display for the current tab, or do you mean things like the title
bar: e.g. for the blfs page I mentioned above, on my firefox
(calling itself bon echo) that says 'X Window System Components -
Bon Echo', or do you mean the field where you type urls ?
I can't read japanese, but I have reasonably good font coverage
now. Perhaps it would help if you post a url to a page which
gives you problems in firefox (yes, I know kde is the main problem,
but both should 'just work' for common character sets).
> Another thing, I can't see the japanese fonts in the font
> installer (kde control center) and I can't add them by hand. May be qt/kde
> doesn't recognize some format, but I think I've done everything in the book.
For the moment, I'm assuming you missed installing Kochi fonts.
The font installer is probably for core fonts, all you have to do is
copy the ttf(s) to somewhere appropriate (a directory under
/usr/share/fonts) and 'fc-cache -v /usr/share/fonts'. Using ~/.fonts
might also work, but I can't see the point of that.
> Just an extra info: all this seems to work for Russian. I've checked a
> random Russian page in google, and everything works fine.
That is primarily because different languages use different glyphs,
and no single truetype font provides all of them.
> And I've checked
> debian.org. At the bottom there are lots of different languages. Well,
> firefox can show all of them but tamil, and konqueror all but tamil and
> arabic. But I can see the kanji in Nihongo (Japanese) and I can see the
> kanji in http://www.debian.org/index.ja.html both with konqueror and
I've got _all_ of those. Similarly, I can see all of the non-latin
fonts used to label the available feeds at news.google.com. With the
exception of cyrillic, I can't begin to hazard a guess at how to
pronounce them, but I can see the shapes. This took a lot of trial
and error after I had the main fonts covered - gucharmap is good for
seeing what you cover adequately, and what has gaps. Maybe there is
a kde application that also does this. Then, you need to go searching
for fonts to fill in the gaps. Nobody is ever likely to be able to
display all possible taxt, but the main languages shouldn't be too
hard to find.
The reason I dwelt on firefox is that I found it a lot easier to
configure - add a font, perhaps restart firefox (can't remember if
that is necessary, probably not necessary if you had the boxes for
undisplayable glyphs), and reload the page to see if it now displays.
Sometimes, you have to force the display (in View -> Character
Encoding I now force it to UTF-8, but I occasionally have to
override that for one or two English pages!).
I can remember having trouble configuring konqueror, but I don't
remember all the details. Of course, the first step is to discover
that the config is done through kcontrol, and you've got that part.
My current settings in the Fonts part of kcontrol use DejaVu Sans
12 for most things (smaller sizes for taskbar and desktop),
Monospace 12 for fixed width (I think working out what to put there
was the hardest part), with System settings for anti-aliasing and
dpi forced to 96 dpi to suit my monitor. Bitstream Vera is probably
now preferred to DejaVu (better hinting), but I didn't used to
install it. The size which you prefer will change as you change the
If I wanted to, I could pick 'Kochi Gothic' or 'Kochi Mincho' (the
japanese fonts), but there are only 2 reasons to ever do that:
(i.) if you really want to use one specific font for japanese, but
the system defaults to the other, or
(ii.) if you are affected by the different japanese and chinese views
of how some glyphs should be rendered and want to force the japanese
If you do this, there will be a side effect, *all* plain ascii text
will be handled by the font you chose, other fonts will only be
called upon for more exotic glyphs such as, perhaps, á ñ ő č ę ß. If
you like the ascii characters in the kochi fonts, that will be fine.
I don't ;)
Actually, there _is_ another step to configuting konqueror - under
'Configure' in konqueror is a fonts tab. This is purely for web
pages, not when used as a file manager, and allows choices for
Standard / Fixed / Serif / Sans / Cursive / Fantasy. I'm sure you
can also play around with those, and perhaps they are useful. For
me, the main thing to do here is to set the Default encoding - mine
happens to be set to 'Use Language Encoding' and it seems to work.
Hope some of this might be useful.
das eine Mal als Tragödie, das andere Mal als Farce
More information about the blfs-support