From owner-ports-jp@jp.freebsd.org  Thu Nov 12 19:45:19 1998
Received: by jaz.jp.freebsd.org (8.9.1+3.1W/8.7.3) id TAA06575;
	Thu, 12 Nov 1998 19:45:19 +0900 (JST)
	(envelope-from owner-ports-jp@jp.FreeBSD.org)
Received: from rf900.physics.usyd.edu.au (rf900.physics.usyd.edu.au [129.78.129.109])
	by jaz.jp.freebsd.org (8.9.1+3.1W/8.7.3) with ESMTP id TAA06566
	for <ports-jp@jp.freebsd.org>; Thu, 12 Nov 1998 19:45:15 +0900 (JST)
	(envelope-from dawes@rf900.physics.usyd.edu.au)
Received: (from dawes@localhost) by rf900.physics.usyd.edu.au (8.8.5/8.8.2) id VAA06299; Thu, 12 Nov 1998 21:44:59 +1100 (EST)
Message-ID: <19981112214458.B6028@rf900.physics.usyd.edu.au>
Date: Thu, 12 Nov 1998 21:44:58 +1100
From: David Dawes <dawes@rf900.physics.usyd.edu.au>
To: Satoshi Asami <asami@cs.berkeley.edu>
Cc: ports-jp@jp.freebsd.org
References: <199811121032.CAA22213@silvia.hip.berkeley.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.93.2i
In-Reply-To: <199811121032.CAA22213@silvia.hip.berkeley.edu>; from Satoshi Asami on Thu, Nov 12, 1998 at 02:32:51AM -0800
Reply-To: ports-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+980914
X-Sequence: ports-jp 5036
Subject: [ports-jp 5036] Re: mkfontdir in empty directory
Errors-To: owner-ports-jp@jp.freebsd.org
Sender: owner-ports-jp@jp.freebsd.org
X-Originator: dawes@rf900.physics.usyd.edu.au

On Thu, Nov 12, 1998 at 02:32:51AM -0800, Satoshi Asami wrote:

>It was brought to my attention that if you run mkfontdir on a
>directory with no font files, it will not create an empty fonts.dir
>(actually one that contains a single line with "0"), but rather do
>nothing.
>
>This might cause problems when all the fonts in lib/X11/fonts/local
>are deleted, as the final mkfontdir run will leave fonts.dir as it was 
>before the deletion of actuan font files.
>
>Is this an intended behavior?  If so, is there any workaround for it?
>(I guess we can make a symlink to ../misc/6x13.pcf.gz (aka "fixed") or
>something, but that's just excruciatingly ugly. ;)

It turns out that the fix for mkfontdir is trivial, so I'll include it
in 3.3.3:

--- mkfontdir.c	1996/12/23 07:10:37	3.4
+++ mkfontdir.c	1998/11/12 10:42:44
@@ -454,7 +454,7 @@
 	return FALSE;
     }
     status = TRUE;
-    if (table.used > 0)
+    if (table.used >= 0)
 	status = WriteFontTable (dirName, &table);
     FontFileFreeTable (&table);
     return status;


David
