diff lisp/x11/x-faces.el @ 30:ec9a17fef872 r19-15b98

Import from CVS: tag r19-15b98
author cvs
date Mon, 13 Aug 2007 08:52:29 +0200
parents 1917ad0d78d7
children 131b0175ea99
line wrap: on
line diff
--- a/lisp/x11/x-faces.el	Mon Aug 13 08:51:58 2007 +0200
+++ b/lisp/x11/x-faces.el	Mon Aug 13 08:52:29 2007 +0200
@@ -167,11 +167,19 @@
 If it fails, it returns nil."
   (try-font-name (x-frob-font-weight font "medium") device))
 
+(defvar *try-oblique-before-italic-fonts* nil
+  "*If NIL, italic fonts are searched before oblique fonts.  If
+non-NIL, oblique fonts are tried before italic fonts.  This is mostly
+applicable to adobe-courier fonts")
+
 (defun x-make-font-italic (font &optional device)
   "Given an X font specification, this attempts to make an `italic' font.
 If it fails, it returns nil."
-  (or (try-font-name (x-frob-font-slant font "i") device)
-      (try-font-name (x-frob-font-slant font "o") device)))
+  (if *try-oblique-before-italic-fonts*
+      (or (try-font-name (x-frob-font-slant font "o") device)
+	  (try-font-name (x-frob-font-slant font "i") device))
+    (or (try-font-name (x-frob-font-slant font "i") device)
+	(try-font-name (x-frob-font-slant font "o") device))))
 
 (defun x-make-font-unitalic (font &optional device)
   "Given an X font specification, this attempts to make a non-italic font.