# HG changeset patch # User Adrian Robert # Date 1222542435 0 # Node ID 713cc05ca791a41f9decfa2fe2d778a6a7dbe878 # Parent 02578383508d69794fae8e1b48dc554b3410d751 * nsfont.m (nsfont_draw): Fix up composition rendering. diff -r 02578383508d -r 713cc05ca791 src/ChangeLog --- a/src/ChangeLog Sat Sep 27 13:10:56 2008 +0000 +++ b/src/ChangeLog Sat Sep 27 19:07:15 2008 +0000 @@ -1,3 +1,8 @@ +2008-09-27 Adrian Robert + + * nsfont.m (nsfont_draw): Fix up composition rendering (cmp_from, + etc.). + 2008-09-27 Eli Zaretskii * composite.c (Fcomposition_get_gstring) diff -r 02578383508d -r 713cc05ca791 src/nsfont.m --- a/src/nsfont.m Sat Sep 27 13:10:56 2008 +0000 +++ b/src/nsfont.m Sat Sep 27 19:07:15 2008 +0000 @@ -902,16 +902,16 @@ XCharStruct *cs; int cwidth, twidth = 0; int hi, lo; - char isComposite = 0; /* s->first_glyph->type == COMPOSITE_GLYPH; */ + char isComposite = s->first_glyph->type == COMPOSITE_GLYPH; /* FIXME: composition: no vertical displacement is considered. */ - t+= s->cmp_from; /* advance into composition */ - for (i =0; inchars - s->cmp_from; i++, t++) + t += s->cmp_from; /* advance into composition */ + for (i = s->cmp_from; i < s->nchars; i++, t++) { hi = (*t & 0xFF00) >> 8; lo = *t & 0x00FF; if (isComposite) { - cwidth = s->cmp->offsets[s->cmp_from++ * 2] - twidth; + cwidth = s->cmp->offsets[i * 2] /* (H offset) */ - twidth; } else { diff -r 02578383508d -r 713cc05ca791 src/nsterm.m --- a/src/nsterm.m Sat Sep 27 13:10:56 2008 +0000 +++ b/src/nsterm.m Sat Sep 27 19:07:15 2008 +0000 @@ -2536,11 +2536,11 @@ static inline NSRect +ns_fix_rect_ibw (NSRect r, int fibw, int frame_pixel_width) /* -------------------------------------------------------------------------- Under NS we draw internal borders inside fringes, and want full-width rendering to go all the way to edge. This function makes that correction. -------------------------------------------------------------------------- */ -ns_fix_rect_ibw (NSRect r, int fibw, int frame_pixel_width) { if (r.origin.y <= fibw+1) { @@ -5040,6 +5040,7 @@ if (emacsframe != old_focus) dpyinfo->x_focus_frame = emacsframe; + /*/last_mouse_frame = emacsframe;? */ if (val >= 0)