Fix wrong font metrics for mouse highlight (backport 2011-12-15T02:12:08Z!handa@m17n.org from trunk)

* src/xftfont.c (xftfont_draw): Use the font metrics of s->font to
fill background (Bug#8992).
This commit is contained in:
YAMAMOTO Mitsuharu 2012-01-15 10:55:52 +08:00 committed by Chong Yidong
parent 76e47e3d6f
commit eb74c659d5
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2012-01-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* xftfont.c (xftfont_draw): Use the font metrics of s->font to
fill background (Bug#8992).
2012-01-13 Kenichi Handa <handa@m17n.org>
* character.c (char_width): New function.

View file

@ -689,7 +689,7 @@ xftfont_draw (s, from, to, x, y, with_background)
if (with_background)
XftDrawRect (xft_draw, &bg,
x, y - face->font->ascent, s->width, face->font->height);
x, y - s->font->ascent, s->width, s->font->height);
code = alloca (sizeof (FT_UInt) * len);
for (i = 0; i < len; i++)
code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8)