emacs-devel
[Top][All Lists]
Advanced

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

Bad drawing of xft fonts overlapping box cursor


From: Johan Bockgård
Subject: Bad drawing of xft fonts overlapping box cursor
Date: Sun, 17 Feb 2008 21:47:13 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

address@hidden (Johan Bockgård) writes:

> Actually, I had already discovered another problem with precisely this
> code

   [draw_glyphs]
   /* If there are any glyphs with lbearing < 0 or rbearing > width in
      the row, redraw some glyphs in front or following the glyph
      strings built above.  */

> that I had been planning to report.

So here is that report:

In some fonts certain characters can produce overlaps with the box
cursor.  This leads to uglily drawn characters.

    emacs -Q -xrm \
      'emacs*font: bitstream vera sans mono:pixelsize=17
       Xft.hintstyle: hintmedium' \
      -fg white -bg black -cr green

    (progn
      (switch-to-buffer "*test*")
      (insert "W\nW\nW")
      (dotimes (_ 50)
        (redisplay)
        (goto-char 4)
        (redisplay)
        (goto-char 6)))

It looks like what happens is that each time the cursor is placed next
to the problematic character another copy of the character is drawn.
For antialiased fonts this produces the effect that the half transparent
pixels become more and more solid.

PNG image

-- 
Johan Bockgård

reply via email to

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