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