unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 129@emacsbugs.donarmstrong.com, emacs-devel@gnu.org
Subject: Re: bug#129: Mouse highlighting fails for font sizes.
Date: Thu, 10 Apr 2008 22:59:53 -0400	[thread overview]
Message-ID: <878wzlm6za.fsf@stupidchicken.com> (raw)
In-Reply-To: <jwvd4oxdtpf.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 10 Apr 2008 22:28:41 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> I think resizing on mouse-movement is a bad idea indeed (for the
> meta-stable problem you mention above, for other technical reasons, as
> well as for purely aesthetic reasons).
> But restricting "same size properties" for mouse-face is problematic as
> well: we may want to use boldness for highlighting but it's not
> guaranteed to preserve the size.  It's more restrictive than necessary.
>
> So the best idea I can come up with is: don't restrict the face, but
> when highlighting, don't change the size of the box in which the text
> is drawn.  This works perfectly for changes that preserve the size, it
> works fine for changes that reduce the size (the reduced-size text is
> just surrounded with more whitespace than necessary, but the user won't
> be surprised).  It doesn't work well if the size is increased (you get
> clipping), but there's not much we can do in that case anyway, so it's
> probably OK.

This might be doable by fixing the glyph size to its original
(unhighlighted) value.  I don't know if that violates assumptions made
in the redisplay code, which might be difficult to work out.

The trouble is that the result might end up looking hideous, and there's
no guarantee that it won't; that would be font-dependent.  While
restricting mouse-highlight to coloring is a little less flexible, we
know the result will look OK.

I think a size restriction is regrettable but unimportant.  Since mouse
highlighting takes place on graphical displays, colors can do the job of
"lighting up" the text, which is what mouse-face is for.

> Another problem with the mouse-highlighting is the flickering we get
> whenever we redisplay: because the mouse-highlighting is done outside of
> the main redisplay, it needs to be undone before redisplay and
> re-applied afterwards.  This is problematic when you have a timer
> changing the display every second.

I've noticed flickering of this sort with the new font backend: M-x info
moving the mouse through the info links causes the text to flicker.  It
doesn't happen when a non-fontconfig font is used, so maybe the new code
is doing something silly.




  reply	other threads:[~2008-04-11  2:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87lk3lh1de.fsf@stupidchicken.com>
2008-04-11  1:51 ` bug#129: Mouse highlighting fails for font sizes Chong Yidong
2008-04-11  2:28   ` Stefan Monnier
2008-04-11  2:59     ` Chong Yidong [this message]
2008-04-11  4:05   ` Kenichi Handa

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=878wzlm6za.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=129@emacsbugs.donarmstrong.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).