emacs-devel
[Top][All Lists]
Advanced

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

Re: Text shadows


From: Kai Ma
Subject: Re: Text shadows
Date: Sun, 12 Mar 2023 17:23:40 +0800


On Mar 12, 2023, at 16:46, Po Lu <luangruo@yahoo.com> wrote:
Theoretically, nothing.  I targeted Cairo because (I think) it is the most popular option on GNU/Linux.

Speaking of this specific implementation, gaussian_blur() relies on a specific Cairo image format ARGB32, (this assumption could be easily removed), and then it is used by ftcrfont_draw() to generate shadows.

I don’t know whether non-Cairo builds (non-cairo X, win32) can/should use gaussian_blur() though, since I’m not familiar with them.

Non-Cairo builds and Cairo builds alike should use the X Rendering
Extension, where an arbitrary blur kernel is a standard picture filter.
Cairo builds on X should as well.

I agree XRender should be used for non-Cairo X builds (when XRender is available).

But it’s probably not a good idea to use XRender on X+Cairo.  In this setting, cairo_show_glyphs is used to draw glyphs, but Cairo does not expose any interface to the underlying Picture object.  So it would require additional memory copies between X and Cairo just for blurring.  I guess it would be slower as the image to blur is usually small.  I will do the benchmarks once I get XRender blurring working.

P.S: the GNU project rejects the Unix convention that `foo()' refers to
the function `foo': `foo()' is a function declarator that returns int
and takes any number of arguments, or alternatively a function call to
`foo' with no arguments.

Point taken.


reply via email to

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