all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* "Bold" effect when anti-aliased glyphs are overwritten
@ 2008-05-27 17:51 Chong Yidong
  2008-05-27 21:09 ` Chong Yidong
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Chong Yidong @ 2008-05-27 17:51 UTC (permalink / raw)
  To: emacs-devel

I've been noticing that glyphs near the cursor occasionally become
"bold" for no reason.  Here's a way to reproduce it:

(defun glyph-test ()
  (interactive)
  (switch-to-buffer "*Test*")
  (erase-buffer)
  (insert "\n ABC")
  (goto-char (point-min)))

M-x glyph-test RET
[down]

The first glyph on the second line, displaying the character "A", now
becomes a little bolder.  Now do

[up]
[down]

Each time, the "A" gets bolder and bolder.

This might depend on the exact font you use (mine is Mono-10).

The reason this happens is that when the redisplay engine calls
draw_glyphs to draw certain glyphs, such as the cursor glyph,
neighboring glyphs are redrawn if there is a left or right overhang
(xdisp.c:19929).

Currently, the foreground of these redrawn glyphs is drawn directly
without erasing the existing glyph.  This is because we generally don't
want to redraw the background, since that might in turn overwrite THIS
glyph's neighbors.  Without anti-aliasing, this procedure is obviously
unproblematic.

With anti-aliasing, it doesn't work well.  Apparently, during the
anti-aliasing calculation, the entire existing glyph---including the
glyph foreground---is treated as the "background".  Thus, the
anti-aliased parts of the foreground character becomes more and more
prominent, and eventually saturates completely.

Does anyone have any ideas for fixing this?




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-05-28  8:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-27 17:51 "Bold" effect when anti-aliased glyphs are overwritten Chong Yidong
2008-05-27 21:09 ` Chong Yidong
2008-05-28  8:49   ` Stephen Berman
2008-05-27 21:18 ` Jason Rumney
2008-05-27 21:21   ` Chong Yidong
2008-05-28  2:21     ` Kenichi Handa
2008-05-28  0:30 ` Kenichi Handa

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.