From owner-freebsd-questions@freebsd.org Wed Dec 30 14:59:02 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2AFDA556D5 for ; Wed, 30 Dec 2015 14:59:02 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from lb2-smtp-cloud2.xs4all.net (lb2-smtp-cloud2.xs4all.net [194.109.24.25]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client CN "*.xs4all.nl", Issuer "GlobalSign Domain Validation CA - SHA256 - G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 753BD12E7 for ; Wed, 30 Dec 2015 14:59:01 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.erewhon.home ([83.162.243.5]) by smtp-cloud2.xs4all.net with ESMTP id zqxo1r00H07iGuj01qxpFk; Wed, 30 Dec 2015 15:57:49 +0100 Received: by slackbox.erewhon.home (Postfix, from userid 1001) id A40C11244B; Wed, 30 Dec 2015 15:57:48 +0100 (CET) Date: Wed, 30 Dec 2015 15:57:48 +0100 From: Roland Smith To: Robert Ames Cc: "Brandon J.Wandersee" , "freebsd-questions@FreeBSD.org" Subject: Re: fonts.dir for TrueType fonts Message-ID: <20151230145748.GB84922@slackbox.erewhon.home> Mail-Followup-To: Robert Ames , "Brandon J.Wandersee" , "freebsd-questions@FreeBSD.org" References: <86twn7erh7.fsf@WorkBox.Home> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Fba/0zbH8Xs+Fj9o" Content-Disposition: inline In-Reply-To: X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2015 14:59:03 -0000 --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--