Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Dec 2015 15:57:48 +0100
From:      Roland Smith <rsmith@xs4all.nl>
To:        Robert Ames <robertames@hotmail.com>
Cc:        "Brandon J.Wandersee" <brandon.wandersee@gmail.com>, "freebsd-questions@FreeBSD.org" <freebsd-questions@freebsd.org>
Subject:   Re: fonts.dir for TrueType fonts
Message-ID:  <20151230145748.GB84922@slackbox.erewhon.home>
In-Reply-To: <BLU177-W92FF8B1084F6D39892A8DC9E70@phx.gbl>
References:  <BLU177-W405013A3DC6434EE436C31C9E70@phx.gbl> <86twn7erh7.fsf@WorkBox.Home> <BLU177-W92FF8B1084F6D39892A8DC9E70@phx.gbl>

next in thread | previous in thread | raw e-mail | index | archive | help

--Fba/0zbH8Xs+Fj9o
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Dec 24, 2015 at 12:39:39PM -0500, Robert Ames wrote:
> > From: brandon.wandersee@gmail.com
> > To: robertames@hotmail.com
> > CC: freebsd-questions@freebsd.org
> > Subject: Re: fonts.dir for TrueType fonts
> > Date: Thu, 24 Dec 2015 10:33:40 -0600
> >=20
> >=20
> > Robert Ames writes:
> >=20
> > > In the Handbook, under section "5.5.2. TrueType Fonts" it states:
> > >
> > >> Once the files have been copied into this directory, use ttmkfdir
> > >> to create a fonts.dir, so that the X font renderer knows that these
> > >> new files have been installed. ttmkfdir is available from the FreeBSD
> > >> Ports Collection as x11-fonts/ttmkfdir.
> > > =20
> > > ttmkdir is not in the current Ports Collection.  So how does one=20
> > > create fonts.dir?
> > >
> > > I'm assuming the Handbook is out of date so I guess what I'm really
> > > asking is how does one add TrueType fonts?
> >
> > Fonts I've added to ~/.fonts have always just worked, as have fonts
> > installed from ports. Are you having an issue with a particular font, or
> > were you just following along in the Handbook and got stuck when it
> > called for x11-fonts/ttmkfdir?
>=20
> Just following along in the Handbook.  I've installed TrueType fonts in
> /usr/local/share/fonts/TrueType/ and added a FontPath to /etc/X11/xorg.co=
nf.
> Was just making sure there was nothing else I needed to do.

Instead of querying the X-server, most modern applications (including those
built on the GTK+ and QT toolkits) these days use the fontconfig library in
combination with freetype to discover fonts. By default, this is set to look
for fonts in /usr/local/share/fonts and /usr/local/lib/X11/fonts and
subdirectories. So any new fonts you put there should be found automatically
after running fc-cache(1) to renew the cache.

Like presumably many others I have a collection of fonts that I use and ins=
tall on all
my machines. The following is the script that I use to install these fonts =
and
make them visible to the system.

    #!/bin/sh
    if [ `id -u` -ne 0 ]; then
        echo "This script must be run as root."
        exit 1
    fi

    FDIR=3D/usr/local/share/fonts/local/

    # Remove all files to make sure we don't leave any cruft.
    rm -f $FDIR/*

    install -C -m 644 -v *.otf *.ttf *.pfb $FDIR

    # Update fontconfig cache
    fc-cache -svf $FDIR

As you can see I don't bother using mkfontscale.

Roland
--=20
R.F.Smith                                   http://rsmith.home.xs4all.nl/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 5753 3324 1661 B0FE 8D93  FCED 40F6 D5DC A38A 33E0 (keyID: A38A33E0)

--Fba/0zbH8Xs+Fj9o
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIcBAABCAAGBQJWg/DsAAoJEED21dyjijPgyCoP/R2vXFgKvtoEaNvOPH3OkN4F
SzHsHOzIlHn3JASQJfrhJF8KPjkodNtQe1+sB0DQNPQqR45f7AqHv1QwqBIVtp6C
GvvK5vhLQljHRDZQnCP1KhuC7b3qlpbVoFB2UpcH/lfUVjS/A1qFPWWKTKH9T/XB
a86YDZbZ86tMJtZqhxpCztH7+kZoUOYr/F7hDlMNFB8PJo4aW3MWDeIXGo4gwkXD
7d6xHdU4rUBRqXlQh14Z3nEDYpQzJqlS1g1TEfl3PnHAHWu4kMEiV26KP2Wrqsaj
xInTM1JkbnGu74dC/Lj6QhBFolKC2vbkET8XVVeplrzjKhBpnf7i2VCVOefE7b4P
77GrD2sevM238nMTgYK4CgMmprZQLKmYIZ1quK+mYQq9GZPM2zvCv8D7aihevMaZ
MhA5zsVjSR4EMCoFrh2tJTrbo0Zl0zmjaIb5QO2JU7mEW0JFHXb/chlhVjSjNVCM
odgCOt1lWNywkwJBaOd0PfIpZTqyymW71/ARHcvcUK3562NXDahsE2UTEVN1XoLZ
+WfGr9BkNZb5W9FqtOJVJC0oUQZvePuVEb0FsWmXMxRvgoVk7yMfanJYb19bQTP/
JE/Pl2v0uLOGDcCTSdTKbwZEQegj/dWHIaNUyJvxJRukYY+w6HdMKX4EZDVJKjK2
3aUxQp5r6bzmIKmwHGEK
=PUxh
-----END PGP SIGNATURE-----

--Fba/0zbH8Xs+Fj9o--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151230145748.GB84922>