emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does face support underline other than a straight line?


From: Stephen J. Turnbull
Subject: Re: Does face support underline other than a straight line?
Date: Wed, 25 Jan 2012 18:26:25 +0900

Eli Zaretskii writes:

 > > If Emacs supports background pixmaps to attach to faces, then it
 > > should be possible to create an appropriate pixmap on the fly.
 > 
 > We have the :stipple attribute of faces; is that what you mean?

I don't know how that works; never used it.  In X11, "stipple" means a
bitmap (mask), and I don't think that would cut it, you need to paint
the whole background.  I wouldn't be surprised if in Emacs it just
means "background image", though.

In XEmacs you can specify a color or a pixmap as background (bitmaps
are promoted to pixmaps, but with -- until about a week ago -- less
than satisfactory results).  So you could specify a background pixmap
(eg, as an XPM) as

                                +------+
                                |      |
                                |      |
                                |      |
                                |      |
                                | **   |
                                |*  *  |
                                |    **|
                                +------+

and it will be tiled appropriately over the extent of the face, and
the text will be printed over that in the foreground color.  Sort of
like poor man's image layers.

Of course you have to set the background color of the pixmap to the
background of the face, and you also have to get the height of the
pixmap in pixels exactly right, I suspect.  The latter might be
difficult for some fonts, especially with sizes specified in printer's
units rather than pixels.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]