[KLUG Members] (no subject)

members@kalamazoolinux.org members@kalamazoolinux.org
Fri, 26 Mar 2004 15:05:29 -0500 (EST)


Date: Fri, 26 Mar 2004 15:05:45 -0500
To: members@kalamazoolinux.org
Subject: Re: fonts in mozilla
Message-ID: <20040326200545.GA16579@grimace.killdevil.org>
Mail-Followup-To: members@kalamazoolinux.org
References: <4064780F.20002@softhome.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4064780F.20002@softhome.net>
X-Operating-System: Linux 2.6.4
X-GPG-Fingerprint: CFDB 31FE EB0E 6E2A 1039  9518 4FA9 A038 F472 6B32
User-Agent: Mutt/1.5.6i

On Fri, Mar 26, 2004 at 07:35:59PM +0100, Bert was only escaped
   alone to tell thee:

> laptop:/usr/local/mozilla/res # ls fonts -l
> total 108
> drwxr-xr-x    2 root     root         4096 Feb  3 12:43 .
> drwxr-xr-x   10 root     root         4096 Feb  3 12:43 ..
> -rw-rw-rw-    1 root     root        41530 Jan 13 14:10 mathfont.properties

Those files have little or nothing to do with it, I think.

Whether Mozilla or Firefox, most font configuration is done by X or
fontconfig.

If you're suffering from a font problem under Linux that you don't get
under Windows, you probably need the freely-distributable MS fonts:

  andalemo.ttf arial.ttf arialbd.ttf arialbi.ttf ariali.ttf ariblk.ttf
  comic.ttf comicbd.ttf cour.ttf courbd.ttf courbi.ttf couri.ttf
  fonts.cache-1 georgia.ttf georgiab.ttf georgiai.ttf georgiaz.ttf
  impact.ttf times.ttf timesbd.ttf timesbi.ttf timesi.ttf trebuc.ttf
  trebucbd.ttf trebucbi.ttf trebucit.ttf verdana.ttf verdanab.ttf
  verdanai.ttf verdanaz.ttf webdings.ttf

Most distros have them. Then run ldd(1) on mozilla-bin, wherever it is.
You should see:

   libXft.so.2 => /usr/X11R6/lib/libXft.so.2 (0x408da000)
   libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0x408ec000)
   libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x408f4000)
   libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x4091b000)

listed with a bunch of other libs. In order for the X RENDER extension
to use them, however (for good antialiasing) you need to make these
available for X using fontconfig. (If you don't see these libs listed,
you have the wrong package installed.)

Make sure you have the Truetype dir installed in fontconfig: on my
system, the user-controlled file /etc/fonts/local.conf has:


<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file for local customizations -->
<fontconfig>
        <!-- Enable sub-pixel rendering -->
	<match target="font">
		<edit name="rgba" mode="assign"><const>rgb</const></edit>
	</match>

        <dir>/usr/X11R6/lib/X11/fonts/truetype</dir>
</fontconfig>


Note the <dir> entry line at the bottom. This publishes the TTF fonts
for all RENDER/fontconfig/freetype-enabled apps. You may have the dir
installed in one of the other files in /etc/fonts.

-- 
Power tools for power fools.