diff lisp/x-faces.el @ 343:8bec6624d99b r21-1-1

Import from CVS: tag r21-1-1
author cvs
date Mon, 13 Aug 2007 10:52:53 +0200
parents fbbf69b4e8a7
children cc15677e0335
line wrap: on
line diff
--- a/lisp/x-faces.el	Mon Aug 13 10:52:06 2007 +0200
+++ b/lisp/x-faces.el	Mon Aug 13 10:52:53 2007 +0200
@@ -202,18 +202,31 @@
   "Given an X font specification, this attempts to make a `bold-italic' font.
 If it fails, it returns nil."
   ;; This is haired up to avoid loading the "intermediate" fonts.
-  (or (try-font-name
-       (x-frob-font-slant (x-frob-font-weight font "bold") "i") device)
-      (try-font-name
-       (x-frob-font-slant (x-frob-font-weight font "bold") "o") device)
-      (try-font-name
-       (x-frob-font-slant (x-frob-font-weight font "black") "i") device)
-      (try-font-name
-       (x-frob-font-slant (x-frob-font-weight font "black") "o") device)
-      (try-font-name
-       (x-frob-font-slant (x-frob-font-weight font "demibold") "i") device)
-      (try-font-name
-       (x-frob-font-slant (x-frob-font-weight font "demibold") "o") device)))
+  (if *try-oblique-before-italic-fonts*
+      (or (try-font-name
+	   (x-frob-font-slant (x-frob-font-weight font "bold") "o") device)
+	  (try-font-name
+	   (x-frob-font-slant (x-frob-font-weight font "bold") "i") device)
+	  (try-font-name
+	   (x-frob-font-slant (x-frob-font-weight font "black") "o") device)
+	  (try-font-name
+	   (x-frob-font-slant (x-frob-font-weight font "black") "i") device)
+	  (try-font-name
+	   (x-frob-font-slant (x-frob-font-weight font "demibold") "o") device)
+	  (try-font-name
+	   (x-frob-font-slant (x-frob-font-weight font "demibold") "i") device))
+    (or (try-font-name
+	 (x-frob-font-slant (x-frob-font-weight font "bold") "i") device)
+	(try-font-name
+	 (x-frob-font-slant (x-frob-font-weight font "bold") "o") device)
+	(try-font-name
+	 (x-frob-font-slant (x-frob-font-weight font "black") "i") device)
+	(try-font-name
+	 (x-frob-font-slant (x-frob-font-weight font "black") "o") device)
+	(try-font-name
+	 (x-frob-font-slant (x-frob-font-weight font "demibold") "i") device)
+	(try-font-name
+	 (x-frob-font-slant (x-frob-font-weight font "demibold") "o") device))))
 
 (defun x-font-size (font)
   "Return the nominal size of the given font.