comparison 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
comparison
equal deleted inserted replaced
29:7976500f47f9 30:ec9a17fef872
165 (defun x-make-font-unbold (font &optional device) 165 (defun x-make-font-unbold (font &optional device)
166 "Given an X font specification, this attempts to make a non-bold font. 166 "Given an X font specification, this attempts to make a non-bold font.
167 If it fails, it returns nil." 167 If it fails, it returns nil."
168 (try-font-name (x-frob-font-weight font "medium") device)) 168 (try-font-name (x-frob-font-weight font "medium") device))
169 169
170 (defvar *try-oblique-before-italic-fonts* nil
171 "*If NIL, italic fonts are searched before oblique fonts. If
172 non-NIL, oblique fonts are tried before italic fonts. This is mostly
173 applicable to adobe-courier fonts")
174
170 (defun x-make-font-italic (font &optional device) 175 (defun x-make-font-italic (font &optional device)
171 "Given an X font specification, this attempts to make an `italic' font. 176 "Given an X font specification, this attempts to make an `italic' font.
172 If it fails, it returns nil." 177 If it fails, it returns nil."
173 (or (try-font-name (x-frob-font-slant font "i") device) 178 (if *try-oblique-before-italic-fonts*
174 (try-font-name (x-frob-font-slant font "o") device))) 179 (or (try-font-name (x-frob-font-slant font "o") device)
180 (try-font-name (x-frob-font-slant font "i") device))
181 (or (try-font-name (x-frob-font-slant font "i") device)
182 (try-font-name (x-frob-font-slant font "o") device))))
175 183
176 (defun x-make-font-unitalic (font &optional device) 184 (defun x-make-font-unitalic (font &optional device)
177 "Given an X font specification, this attempts to make a non-italic font. 185 "Given an X font specification, this attempts to make a non-italic font.
178 If it fails, it returns nil." 186 If it fails, it returns nil."
179 (try-font-name (x-frob-font-slant font "r") device)) 187 (try-font-name (x-frob-font-slant font "r") device))