From: Adrian Robert Date: Sat, 27 Sep 2008 19:07:15 +0000 (+0000) Subject: * nsfont.m (nsfont_draw): Fix up composition rendering. X-Git-Tag: emacs-pretest-23.0.90~2743 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=81cfe31c4dc987de116fbd85a9aa57063adf2c20;p=emacs.git * nsfont.m (nsfont_draw): Fix up composition rendering. --- diff --git a/src/ChangeLog b/src/ChangeLog index 7ceacd2d97b..aa372dd23df 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 --git a/src/nsfont.m b/src/nsfont.m index 42507f08eac..8761e57ca6e 100644 --- a/src/nsfont.m +++ b/src/nsfont.m @@ -902,16 +902,16 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y, 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 --git a/src/nsterm.m b/src/nsterm.m index 651b400d8bf..202f4a2d306 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -2536,11 +2536,11 @@ hide_hourglass () 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 (NS_KEYLOG) NSLog (@"attributedSubstringFromRange request"); if (emacsframe != old_focus) dpyinfo->x_focus_frame = emacsframe; + /*/last_mouse_frame = emacsframe;? */ if (val >= 0)