From xemacs-m  Thu Mar  6 14:58:33 1997
Received: from gwa.ericsson.com (gwa.ericsson.com [198.215.127.2])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id OAA25196
	for <xemacs-beta@xemacs.org>; Thu, 6 Mar 1997 14:58:32 -0600 (CST)
Received: from mr2.exu.ericsson.se (mr2.exu.ericsson.com [138.85.147.12]) by gwa.ericsson.com (8.8.2/8.8.2) with ESMTP id OAA03673 for <xemacs-beta@xemacs.org>; Thu, 6 Mar 1997 14:58:00 -0600 (CST)
Received: from screamer.rtp.ericsson.se (screamer.rtp.ericsson.se [147.117.133.13]) by mr2.exu.ericsson.se (8.7.1/NAHUB-MR1.1) with SMTP id OAA13441 for <xemacs-beta@xemacs.org>; Thu, 6 Mar 1997 14:57:59 -0600 (CST)
Received: from rcur (rcur18.rtp.ericsson.se [147.117.133.138]) by screamer.rtp.ericsson.se (8.6.12/8.6.4) with ESMTP id PAA29676 for <xemacs-beta@xemacs.org>; Thu, 6 Mar 1997 15:57:58 -0500
To: XEmacs Mailing List <xemacs-beta@xemacs.org>
Subject: Small addition for make-face-italic
Mime-Version: 1.0 (generated by tm-edit 7.105)
Content-Type: text/plain; charset=US-ASCII
Date: Thu, 06 Mar 1997 15:57:58 -0500
Message-ID: <25022.857681878@rtp.ericsson.se>
From: Raymond Toy <toy@rtp.ericsson.se>


Here is a possible small patch for make-face-italic that makes it do
what I want.  My problem is that with my adobe courier font,
make-face-italic wants to use a slant of "i".  This picks a type 1
font that doesn't render well.  However, a slant of "o" gets the
bitmapped font that I really want.  

This patch allows the user to choose which should be tried first.  The
default is the current behaviour, of course.

Replace make-face-italic in x11/x-faces.el with:

(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."
  (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))))



Ray

