On 3/13/06, Alexander E. Patrakov <[EMAIL PROTECTED]> wrote:
>
> Or configure Fontconfig to look into /usr/X11R6/lib/X11/fonts/{TTF,OTF}
> (a patch to fonts.conf is acceptable, because all distros are doing this
> sort of things) with a note that non-Latin1 users have to download more
> fonts and put them into /usr/share/fonts.
There are a couple issues I see here with Fontconfig-2.3.2 (haven't
looked at the dev releases).
First, you don't have to patch fonts.conf. You can simply supply any
other directories you want with --with-add-fonts to fontconfig. These
will be put in fonts.conf using the variable FC_FONTPATH. E.g.,
--with-add-fonts=/usr/X11R6/lib/X11/fonts.
Second, something to think about if you rebuild Fontconfig and
/usr/*/lib/X11/fonts exist and you don't want those as defaults in
fonts.conf. Unless you specifically supply --with-add-fonts=no or
--without-add-fonts, configure checks if /usr/*/lib/X11/fonts exists
as a directory and adds them as defaults to fonts.conf. Here's the
relevant shell script:
# Check whether --with-add-fonts or --without-add-fonts was given.
if test "${with_add_fonts+set}" = set; then
withval="$with_add_fonts"
add_fonts="$withval"
else
add_fonts=yes
fi;
case "$add_fonts" in
yes)
FC_ADD_FONTS=""
for dir in /usr/X11R6/lib/X11 /usr/X11/lib/X11 /usr/lib/X11; do
case x"$FC_ADD_FONTS" in
x)
sub="$dir/fonts"
if test -d "$sub"; then
case x$FC_ADD_FONTS in
x)
FC_ADD_FONTS="$sub"
;;
*)
FC_ADD_FONTS="$FC_ADD_FONTS,$sub"
;;
esac
fi
;;
esac
done
cat >>confdefs.h <<_ACEOF
#define FC_ADD_FONTS "$add_fonts"
_ACEOF
;;
no)
FC_ADD_FONTS=""
;;
*)
FC_ADD_FONTS="$add_fonts"
cat >>confdefs.h <<_ACEOF
#define FC_ADD_FONTS "$add_fonts"
_ACEOF
;;
esac
In light of Alexander's statement that Fontconfig should not be using
bitmap fonts, should --without-add-fonts be added to the instructions
with a note to override this if you have fonts in some other location
(like /usr/lib/X11/fonts)? This would guard against people rebuilding
Fontconfig later and unwittingly adding the bitmapped fonts location
to their default setup.
I think a good note in Fontconfig about the use of bitmapped fonts
installed later in X and how to setup the default font paths could
take care of this issue.
--
Dan
--
http://linuxfromscratch.org/mailman/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page