diff options
| author | Miles Bader <miles@gnu.org> | 2002-06-10 02:15:24 +0000 |
|---|---|---|
| committer | Miles Bader <miles@gnu.org> | 2002-06-10 02:15:24 +0000 |
| commit | 16320ac7d4c9eaed7c8a8b4845e8b10f9b0dd78f (patch) | |
| tree | 6e989bad17e32d6f0cd09ec2a72a4a2d6df8379f | |
| parent | 135f42ee4dea5dcc1202acc5ab54fb5dde2a4c1b (diff) | |
| download | emacs-16320ac7d4c9eaed7c8a8b4845e8b10f9b0dd78f.tar.gz | |
(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.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/faces.el | 18 |
2 files changed, 19 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 13ab17c1868..68c428f29f2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,8 @@ -2002-06-05 Miles Bader <miles@gnu.org> +2002-06-10 Miles Bader <miles@gnu.org> * faces.el (display-supports-face-attributes-p): New function. + (face-spec-set-match-display): Support `supports' predicate. + (italic): Try underlining for displays that don't support real italics. * term/tty-colors.el (color-name-rgb-alist): Use 16-bit RGB values instead of 8-bit, for consistency with the rest of emacs. (tty-color-canonicalize): Only copy COLOR if we need to change it. diff --git a/lisp/faces.el b/lisp/faces.el index 83832f2b47f..3e4d44709b2 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -1318,6 +1318,8 @@ If FRAME is nil, the current FRAME is used." ((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 @@ any display that can display bold, and a `:foreground \"yellow\"' as long 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 @@ created." :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) |
