Mercurial > emacs
changeset 45722:c553d91619aa
(display-supports-face-attributes-p): Work correctly if DISPLAY is a frame.
(face-spec-set-match-display): Support `supports' predicate.
(italic): Try underlining for displays that don't support real italics.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 10 Jun 2002 02:15:05 +0000 |
parents | 6bc9049644e2 |
children | 5b5e4677c057 |
files | lisp/faces.el |
diffstat | 1 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/faces.el Sun Jun 09 21:58:46 2002 +0000 +++ b/lisp/faces.el Mon Jun 10 02:15:05 2002 +0000 @@ -1318,6 +1318,8 @@ ((eq req 'background) (memq (frame-parameter frame 'background-mode) options)) + ((eq req 'supports) + (display-supports-face-attributes-p options frame)) (t (error "Unknown req `%S' with options `%S'" req options))))) match)) @@ -1494,7 +1496,10 @@ as it can display a yellowish color, but `:slant italic' will _not_ be satisified by the tty display code's automatic substitution of a `dim' face for italic." - (let ((frame (car (frames-on-display-list display)))) + (let ((frame + (if (framep display) + display + (car (frames-on-display-list display))))) ;; For now, we assume that non-tty displays can support everything. ;; Later, we should add the ability to query about specific fonts, ;; colors, etc. @@ -1938,7 +1943,16 @@ :group 'basic-faces) -(defface italic '((t :slant italic)) +(defface italic + '((((supports :slant italic)) + :slant italic) + (((supports :underline t)) + :underline t) + (t + ;; default to italic, even it doesn't appear to be supported, + ;; because in some cases the display engine will do it's own + ;; workaround (to `dim' on ttys) + :slant italic)) "Basic italic font." :group 'basic-faces)