Ben Wing writes:
Why not add built-in face properties like font-family,
font-weight, font-slant, etc.? Otherwise you arbitrarily
stick some properties inside of property lists hung off a
single property, and other properties are direct face
properties. Ugly ugly ugly. Keep it simple.
I think the font specifier route is the simple route. Font
proerties are not face properties any more than glyph properties
are extent properties. Making [font :family "lucidatypewriter"
:width 'normal :height 200] an instantiator means that old code
keeps working. We don't have to worry about what happens when
some code does (set-face-font 'foo "fixed") and some other code
sets all these new face properties. Which code should win? Why?
We don't have to worry about the surprising new ways fonts will
be instantiated when all the new face font attributes are
separately subject to the face inheritance rules, where currently
only the entire font is subject to those rules. Do you really
want to query fifteen different face properties to figure out
what font is going to be used on a device? What is
(specifier-instance (face-font 'foo)) going to do?
Also in the example:
> > (set-face-attribute 'foo nil
> > :family "lucidatypewriter"
> > :width 'normal
> > :height 200
> > :weight 'normal
> > :foreground "red"
> > :background "pink"
> > :strike-through t)
foreground and background would not be part of the font
instantiator since they are face properties.