all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: bojohan+news@dd.chalmers.se (Johan Bockgård)
To: emacs-devel@gnu.org
Subject: Bad drawing of xft fonts overlapping box cursor
Date: Sun, 17 Feb 2008 21:47:13 +0100	[thread overview]
Message-ID: <yoijpruv9upa.fsf_-_@remote2.student.chalmers.se> (raw)
In-Reply-To: yoijve4n9vpt.fsf@remote2.student.chalmers.se

[-- Attachment #1: Type: text/plain, Size: 1080 bytes --]

bojohan+news@dd.chalmers.se (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.


[-- Attachment #2: emacs-badfont.png --]
[-- Type: image/png, Size: 1815 bytes --]

[-- Attachment #3: Type: text/plain, Size: 21 bytes --]


-- 
Johan Bockgård

  reply	other threads:[~2008-02-17 20:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11 15:47 23.0.60; broken mouse-face highlighting in Gnus Stephen Berman
2008-02-16 23:56 ` 23.0.60; Deja vu font breaks " Stephen Berman
2008-02-17  0:40   ` Johan Bockgård
2008-02-17 13:07     ` Stephen Berman
2008-02-17 20:25       ` Johan Bockgård
2008-02-17 20:47         ` Johan Bockgård [this message]
2008-02-18  0:36           ` Bad drawing of xft fonts overlapping box cursor Stephen Berman
2008-02-18  0:58             ` Jason Rumney
2008-02-18  0:36         ` 23.0.60; Deja vu font breaks mouse-face highlighting in Gnus Stephen Berman
2008-02-18  1:12           ` Johan Bockgård

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

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

  git send-email \
    --in-reply-to=yoijpruv9upa.fsf_-_@remote2.student.chalmers.se \
    --to=bojohan+news@dd.chalmers.se \
    --cc=emacs-devel@gnu.org \
    /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 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.