X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fx-faces.el;h=46677cf4914623585642d5f97ad813d13ed3a090;hb=43027e1315036a9a2a3ca7e09aa0d51ef93e520a;hp=123fcc07420c986291c6766c52f2d37c5f509bb1;hpb=33c8db8e2477d62fd8734f65475f2ed516167532;p=chise%2Fxemacs-chise.git diff --git a/lisp/x-faces.el b/lisp/x-faces.el index 123fcc0..46677cf 100644 --- a/lisp/x-faces.el +++ b/lisp/x-faces.el @@ -176,18 +176,19 @@ If it fails, it returns nil." If it fails, it returns nil." (try-font-name (x-frob-font-weight font "medium") device)) -(defcustom *try-oblique-before-italic-fonts* nil +(defcustom 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" :type 'boolean - :tag "Try Oblique Before Italic Fonts" :group 'x) +(define-obsolete-variable-alias '*try-oblique-before-italic-fonts* + 'try-oblique-before-italic-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* + (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) @@ -202,18 +203,31 @@ If it fails, it returns nil." "Given an X font specification, this attempts to make a `bold-italic' font. If it fails, it returns nil." ;; This is haired up to avoid loading the "intermediate" fonts. - (or (try-font-name - (x-frob-font-slant (x-frob-font-weight font "bold") "i") device) - (try-font-name - (x-frob-font-slant (x-frob-font-weight font "bold") "o") device) - (try-font-name - (x-frob-font-slant (x-frob-font-weight font "black") "i") device) - (try-font-name - (x-frob-font-slant (x-frob-font-weight font "black") "o") device) - (try-font-name - (x-frob-font-slant (x-frob-font-weight font "demibold") "i") device) - (try-font-name - (x-frob-font-slant (x-frob-font-weight font "demibold") "o") device))) + (if *try-oblique-before-italic-fonts* + (or (try-font-name + (x-frob-font-slant (x-frob-font-weight font "bold") "o") device) + (try-font-name + (x-frob-font-slant (x-frob-font-weight font "bold") "i") device) + (try-font-name + (x-frob-font-slant (x-frob-font-weight font "black") "o") device) + (try-font-name + (x-frob-font-slant (x-frob-font-weight font "black") "i") device) + (try-font-name + (x-frob-font-slant (x-frob-font-weight font "demibold") "o") device) + (try-font-name + (x-frob-font-slant (x-frob-font-weight font "demibold") "i") device)) + (or (try-font-name + (x-frob-font-slant (x-frob-font-weight font "bold") "i") device) + (try-font-name + (x-frob-font-slant (x-frob-font-weight font "bold") "o") device) + (try-font-name + (x-frob-font-slant (x-frob-font-weight font "black") "i") device) + (try-font-name + (x-frob-font-slant (x-frob-font-weight font "black") "o") device) + (try-font-name + (x-frob-font-slant (x-frob-font-weight font "demibold") "i") device) + (try-font-name + (x-frob-font-slant (x-frob-font-weight font "demibold") "o") device)))) (defun x-font-size (font) "Return the nominal size of the given font.