On Mon, 17 Apr 2006 13:09:16 +0530, Baishampayan Ghose [EMAIL
PROTECTED] said:
Hello, I am using the Emacs XFT_JHD_BRANCH and there is a weird
mode-line display bug in it. When the file has variable width fonts
like in LaTeX mode, the mode-line becomes garbled on scrolling. A
screen shot [0] is attached. I guess now that the XFT Unicode
branches have been merged, this critical bug will be fixed. I can
help with testing the branch by doing daily builds, if it's being
developed actively. Miles, what do you think about this? Regards,
BG
[0] http://people.ubuntu-in.org/~ghoseb/emacs_xft_mode-line_bug.png
I tried to make a small patch for some problems that don't require too
many changes to fix (or workaround). This is for XFT_JHD_BRANCH, not
for unicode-xft. I don't have a plan to work for Xft support, but I
simply ported some results from my previous ATSUI support on Mac to
Xft.
YAMAMOTO Mitsuharu
[EMAIL PROTECTED]
Index: src/xfaces.c
===
RCS file: /cvsroot/emacs/emacs/src/xfaces.c,v
retrieving revision 1.316.2.4
diff -c -r1.316.2.4 xfaces.c
*** src/xfaces.c12 Jan 2006 10:25:47 - 1.316.2.4
--- src/xfaces.c25 Apr 2006 07:37:07 -
***
*** 5282,5288
XQueryColors (FRAME_X_DISPLAY (f), FRAME_X_DISPLAY_INFO (f)-cmap,
colors, 2);
! face-xft_fg.color.alpha = face-xft_fg.color.alpha = 0x;
face-xft_fg.color.red = colors[0].red;
face-xft_fg.color.green = colors[0].green;
face-xft_fg.color.blue = colors[0].blue;
--- 5282,5288
XQueryColors (FRAME_X_DISPLAY (f), FRAME_X_DISPLAY_INFO (f)-cmap,
colors, 2);
! face-xft_fg.color.alpha = face-xft_bg.color.alpha = 0x;
face-xft_fg.color.red = colors[0].red;
face-xft_fg.color.green = colors[0].green;
face-xft_fg.color.blue = colors[0].blue;
***
*** 7243,7248
--- 7243,7251
{
bcopy (base_face, face, sizeof *face);
face-gc = 0;
+ #ifdef HAVE_XFT
+ face-xft_draw = NULL;
+ #endif
/* Don't try to free the colors copied bitwise from BASE_FACE. */
face-colors_copied_bitwise_p = 1;
Index: src/xterm.c
===
RCS file: /cvsroot/emacs/emacs/src/xterm.c,v
retrieving revision 1.861.2.4
diff -c -r1.861.2.4 xterm.c
*** src/xterm.c 12 Jan 2006 10:25:47 - 1.861.2.4
--- src/xterm.c 25 Apr 2006 07:37:08 -
***
*** 1202,1210
x_set_glyph_string_clipping (s)
struct glyph_string *s;
{
! XRectangle r;
! get_glyph_string_clip_rect (s, r);
! XSetClipRectangles (s-display, s-gc, 0, 0, r, 1, Unsorted);
}
--- 1202,1216
x_set_glyph_string_clipping (s)
struct glyph_string *s;
{
! #define MAX_CLIP_RECTS 2
! XRectangle r[MAX_CLIP_RECTS];
! int n;
!
! n = get_glyph_string_clip_rects (s, r, MAX_CLIP_RECTS);
! XSetClipRectangles (s-display, s-gc, 0, 0, r, n, Unsorted);
! #ifdef HAVE_XFT
! XftDrawSetClipRectangles (s-face-xft_draw, 0, 0, r, n);
! #endif
}
***
*** 1382,1392
strlen (weight_name) +
strlen (slant_name) +
5 + /* pixel */
! 9 + /* stars */
14 + /* dashes */
1); /* null */
xlfd = malloc (len);
! sprintf(xlfd, -%s-%s-%s-%s-*-*-%d-*-*-*-*-0-*-*,
foundry, family, weight_name, slant_name,
(int) (pixel + 0.5));
return xlfd;
--- 1388,1398
strlen (weight_name) +
strlen (slant_name) +
5 + /* pixel */
! 6 + 1 + 8 + 1 + /* stars, 0, iso10646, 1 */
14 + /* dashes */
1); /* null */
xlfd = malloc (len);
! sprintf(xlfd, -%s-%s-%s-%s-*-*-%d-*-*-*-*-0-iso10646-1,
foundry, family, weight_name, slant_name,
(int) (pixel + 0.5));
return xlfd;
***
*** 1551,1589
use XDrawImageString when drawing the cursor so that there is
no chance that characters under a box cursor are invisible. */
#ifdef HAVE_XFT
! /* KOKO: Always clear background for now, there are some redraw problems
! otherwise. */
! if (1 || ! (s-for_overlaps
! || (s-background_filled_p s-hl != DRAW_CURSOR)))
! XftDrawRect (s-face-xft_draw,
! s-hl == DRAW_CURSOR ? s-face-xft_fg :
s-face-xft_bg,
! s-x,
! s-y,
! s-width + s-right_overhang,
! s-height);
! if (s-two_byte_p)
! {
! XftChar16 ch[s-nchars];
! int