On Thursday 24 October 2002 11:05, Tzafrir Cohen wrote:
> you use Xft. Therefore the X server's fonts config is not that much
> relevant.
I likely wasn't clear enough. For the last 2-3 versions of RH, RH has used
xfs, which means that the fonts are listed in /etc/X11/fs/config; I thought
that much was apparent from my post.
Anyway, now that you point out, ou are right, the font server underwent some
changes, however, /etc/X11/XftConfig seems obsolete:
[root@localhost psyche]# cat /etc/X11/XftConfig.README-OBSOLETE
# IMPORTANT NOTICE about XftConfig:
#
# The XftConfig config file has been deprecated and obsoleted by
# /etc/fonts/fonts.conf, which is the new font configuration file for Xft2,and
# is provided by "fontconfig". A backward compatible Xft1 library is also
# provided which has been converted to use fontconfig also and provide users
# with a single way of configuring client side fonts, while retaining binary
# compatibility. For information on configuring fonts using fontconfig,
# please consult the fontconfig documentation.
Unfortunately, the man page for fontconfig is horribly detailed and there
doesn't seem to be a simple way to generate the additional XML records for
new fonts. XML is nice to read, but a pain to write - gimme a plain old text
file. However, "doesn't seem" !~ /doesn't exist/, so I discovered the
following:
> Add the directory to:
>
> /etc/X11/XftConfig
>
> (or to ~/.XftConfig)
>
> you need to add the following line:
>
> dir "/usr/local/share/fonts/ms-webfonts"
The above wouldn't work or would anyway soon go out of fashion as the
config file is deprecated. However, your tip is a good one. The config file is
/etc/fonts/fonts.conf. Look here:
[root@localhost ms-webfonts]# fc-cache --verbose --force
fc-cache: "/usr/X11R6/lib/X11/fonts/Type1": caching, 29 fonts, 0 dirs
fc-cache: "/usr/share/fonts": caching, 0 fonts, 2 dirs
fc-cache: "/usr/share/fonts/default": caching, 0 fonts, 3 dirs
fc-cache: "/usr/share/fonts/default/ghostscript": caching, 8 fonts, 0 dirs
fc-cache: "/usr/share/fonts/default/TrueType": caching, 20 fonts, 0 dirs
fc-cache: "/usr/share/fonts/default/Type1": caching, 35 fonts, 0 dirs
fc-cache: "/usr/share/fonts/afms": caching, 0 fonts, 1 dirs
fc-cache: "/usr/share/fonts/afms/adobe": caching, 0 fonts, 0 dirs
fc-cache: "/root/.fonts": no such directory, skipping
fc-cache: succeeded
Boohoo, fc-cache didn't find my fonts :-(.
Let's try some detective work:
[root@localhost ms-webfonts]# grep fonts /etc/fonts/fonts.conf
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts.conf file to configure system font access -->
changes to [EMAIL PROTECTED] so that future releases can include
<dir>/usr/X11R6/lib/X11/fonts/Type1</dir>
<dir>/usr/share/fonts</dir>
<dir>~/.fonts</dir>
<include ignore_missing="yes">~/.fonts.conf</include>
Alias well known font names to available TrueType fonts
We can't hint CJK fonts well, so turn off hinting for CJK fonts.
Artificial oblique for fonts without an italic or oblique version
in fonts. All other blank chars are assumed to be broken and
Aha, this looks very much like the syntax Tzafrir suggested, so let's fix it:
[root@localhost ms-webfonts]# vi /etc/fonts/fonts.conf
<do some work in vi, adding one directory. fc-cache will automatically recurse
through subdirectories. BTW, I'll have to admit, I am a vi guy, not emacs,
although that has more to do with the ease to learn gvim vs. xemacs than with
anything else.>
Now let's see what happens:
[root@localhost ms-webfonts]# fc-cache --verbose --force
fc-cache: "/usr/X11R6/lib/X11/fonts/Type1": caching, 29 fonts, 0 dirs
fc-cache: "/usr/share/fonts": caching, 0 fonts, 2 dirs
fc-cache: "/usr/share/fonts/default": caching, 0 fonts, 3 dirs
fc-cache: "/usr/share/fonts/default/ghostscript": caching, 8 fonts, 0 dirs
fc-cache: "/usr/share/fonts/default/TrueType": caching, 20 fonts, 0 dirs
fc-cache: "/usr/share/fonts/default/Type1": caching, 35 fonts, 0 dirs
fc-cache: "/usr/share/fonts/afms": caching, 0 fonts, 1 dirs
fc-cache: "/usr/share/fonts/afms/adobe": caching, 0 fonts, 0 dirs
fc-cache: "/root/.fonts": no such directory, skipping
fc-cache: "/usr/local/share/fonts": caching, 0 fonts, 2 dirs
fc-cache: "/usr/local/share/fonts/TrueType": caching, 15 fonts, 1 dirs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
fc-cache: "/usr/local/share/fonts/TrueType/doc": caching, 0 fonts, 0 dirs
fc-cache: "/usr/local/share/fonts/ms-webfonts": caching, 26 fonts, 0 dirs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
fc-cache: succeeded
Yoopiyeey, the fonts are back, the fonts are back.
may be time for rm /etc/X11/fs/config* but I'll hold off on that one.
Thanks for the tips,
Arie
--
It is absurd to seek to give an account of the matter to a man
who cannot himself give an account of anything; for insofar as
he is already like this, such a man is no better than a vegetable.
-- Book IV of Aristotle's Metaphysics
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]