This sounds cool. Is the code available?
andy
At 09:29 AM 12/22/99 -0500, William M. Perry wrote:
Per Abrahamsen <abraham(a)dina.kvl.dk> writes:
> wmperry(a)aventail.com (William M. Perry) writes:
> 
> > Sure.  We should really just try to emulate the real font model that 
is
in
> > Emacs 21 right now though.  This would be a huge win for
cross-platform
> > setting of font resources.
> 
> In Emacs 21 :bold and :italic are being fased out in favor of :weight
> and :slant.  :bold and :italic are still recognized by `defface' for
> backward compatibility, but not by `customize-face'.
> 
> Do you want XEmacs 21.2 to go the same way?
We should stay consistent of course, but what I _really_ meant was that the
new face model that Emacs uses internally should be adopted by XEmacs.
This is basically moving font.el into the core C code and making it nice
and studly.
So to make a face in Emacs 21 now, you do:
(make-face 'foo)
(set-face-attribute 'foo nil
                     :family "lucidatypewriter"
                     :width 'normal
                     :height 200
                     :weight 'normal
                     :foreground "red"
                     :background "pink"
                     :strike-through t)
and you get
Attachment Converted: "c:\eudora\attach\emacs21-fonts.gif"
It keeps a face cache on a per-frame basis.  The actual code to implement
the font matching is trivial.  I think what we'd need to do is add a new
device method for 'realize_font' that gets passed a property list.  This
way if windows wants to support dropcaps or other funky face properties
that would be a bitch under X or TTY, it can.
-Bill P.
 
--------------------------------------------------------------
Dr Andy Piper
Senior Consultant Architect, BEA Systems Ltd