emacs-devel
[Top][All Lists]
Advanced

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

Re: Text shadows


From: Eli Zaretskii
Subject: Re: Text shadows
Date: Sun, 12 Mar 2023 09:12:33 +0200

> From: Kai Ma <justksqsf@gmail.com>
> Date: Sun, 12 Mar 2023 12:06:28 +0800
> 
> Recently, I implemented the “text shadows” feature for Cairo-powered 
> windowing systems, including X11 and Wayland.  See [1] if you wonder what 
> that looks like.

Which parts of the feature implementation really require Cairo?  IOW,
why cannot this be available to non-Cairo builds as well?

> This feature adds a new face attribute :shadow, and accepts values like:
> 
> - FLOAT                 how much blurring?
> - (FLOAT . COLOR)       additionally, specifies a color for the shadow
> - (FLOAT COLOR OFFSET)  additionally, specifies an offset (x . y)

I think at least in some GUI systems the offset is specified as radius
and angle.

> I’m writing to ask if the community is interested in accepting this feature 
> into mainline Emacs?  If so, I will improve things and make a formal patch.

Yes, I think we'd like to support this feature.  But it looks to me
like the current WIP is incomplete, as it doesn't handle the change in
glyph metrics due to the shadowing, see below.

It is best to submit a feature-request bug report using
report-emacs-bug, and then continue the discussion on our issue
tracker.

> 1. The shadows sometimes should be drawn outside the glyph extents, but they 
> aren’t drawn.
> 2. Previously drawn shadows are not cleared, and they even accumulate.  This 
> can be observed with blink-cursor-mode enabled.

This probably means you need further changes in the layout part of the
display code, in xdisp.c, to account for the changes in the glyph
metrics due to the shadow attribute.  See, for example, how the 'box'
face attribute is handled there.



reply via email to

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