--- /home/kishkin/fonts.c	Mon Dec 22 20:13:10 2008 UTC
+++ /home/kishkin/fonts_upd.c	Tue Dec 23 10:00:45 2008 UTC
@@ -643,7 +643,17 @@
       new_match->stretch == desc->stretch &&
       new_match->gravity == desc->gravity)
     {
-      int old_distance = old_match ? compute_distance (desc, old_match) : G_MAXINT;
+      int old_distance = G_MAXINT;
+      if (old_match)
+        {
+          if (old_match->variant == desc->variant &&
+              old_match->stretch == desc->stretch &&
+              old_match->gravity == desc->gravity)
+            {
+              old_distance = compute_distance (desc, old_match);
+            }
+        }
+
       int new_distance = compute_distance (desc, new_match);
 
       if (new_distance < old_distance)
