diff lisp/x11/x-faces.el @ 108:360340f9fd5f r20-1b6

Import from CVS: tag r20-1b6
author cvs
date Mon, 13 Aug 2007 09:18:39 +0200
parents 8ff55ebd4be9
children 538048ae2ab8
line wrap: on
line diff
--- a/lisp/x11/x-faces.el	Mon Aug 13 09:17:27 2007 +0200
+++ b/lisp/x11/x-faces.el	Mon Aug 13 09:18:39 2007 +0200
@@ -168,11 +168,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.