unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Kai Ma <justksqsf@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Text shadows
Date: Sun, 12 Mar 2023 09:12:33 +0200	[thread overview]
Message-ID: <83mt4iv3xa.fsf@gnu.org> (raw)
In-Reply-To: <72650A07-DEC8-4E08-A524-5C7AF804F3CB@gmail.com> (message from Kai Ma on Sun, 12 Mar 2023 12:06:28 +0800)

> 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.



  parent reply	other threads:[~2023-03-12  7:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-12  4:06 Text shadows Kai Ma
2023-03-12  4:18 ` Kai Ma
2023-03-12  7:12 ` Eli Zaretskii [this message]
2023-03-12  8:24   ` Kai Ma
2023-03-12  8:46     ` Po Lu
2023-03-12  9:23       ` Kai Ma
2023-03-12 10:33         ` Po Lu
2023-03-12  9:14     ` Eli Zaretskii
2023-03-12  9:55       ` Kai Ma
2023-03-12 11:33         ` Eli Zaretskii
2023-03-12 11:49           ` Kai Ma
2023-03-12 12:36             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83mt4iv3xa.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=justksqsf@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).