[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: terminal capability querying
From: |
Miles Bader |
Subject: |
Re: terminal capability querying |
Date: |
20 Apr 2002 18:58:57 +0900 |
"Eli Zaretskii" <address@hidden> writes:
> > No #-of-colors tests, but nice, flexible behavior on lots of display
> > types!
>
> This will work well if we assume that color choices for foreground and
> background are independent. I suspect that it's not always so. In
> those cases where there's a dependency between the two colors, I think
> we had better keep that dependency explicit in defface in some way
> (although doing that via the number of supported colors is not the
> only possible way).
Actually, it occured to me that it would be a nice feature to also allow
passing attribute lists to `display-supports-face-attribute-p' (or
whatever it ends up being called), e.g.:
(display-supports-face-attribute-p '(:foreground "red" :background "white"))
In most cases the effect would be same as simply the `and' of the
individual attributes, but for others, it could use the extra info to
return more `intelligent' results; in the case where both :foreground
and :background are specified, for instance, it could at least ensure
that the colors are `different".
For X displays, it could use more fully-specified font info to test, for
instance, if a font _really_ has a bold-faced font in a particular
family. For instance, it might return true for '(:weight bold) but
nil for '(:family "wackyfont" :weight "bold") -- many non-standard
fonts lack bold-faced variants.
Since a list of attributes is the form that occurs naturally in the
defface `or'-vectors I described, this would directly benefit people
using defface (and make defface's job even easier).
> So sometimes your vector of alternative colors will have to specify a
> totally different foreground color for low-end displays, and thus
> require a suitably different background color.
I agree, sometimes it's going to be necessary to use special cases, so
it's clearly necessary to be able to do low-level tests like the number
colors, but I'd like to avoid it as much as possible.
-Miles
--
"Most attacks seem to take place at night, during a rainstorm, uphill,
where four map sheets join." -- Anon. British Officer in WW I
Re: terminal capability querying, Richard Stallman, 2002/04/21