From 93c7fcf88a9c3a61380fc9a7aee67b3f627212d1 Mon Sep 17 00:00:00 2001 From: Teodor Zlatanov Date: Sun, 7 Sep 2008 11:16:20 +0000 Subject: [PATCH] * nsfont.m (nsfont_draw): Fix the references to missing gidx data member to point to cmp_from. * xdisp.c: Doc fix for references to gidx data member. --- src/ChangeLog | 7 +++++++ src/nsfont.m | 10 +++++----- src/xdisp.c | 4 ++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 96e1062af0d..82f4c5ab555 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2008-09-07 Teodor Zlatanov + + * nsfont.m (nsfont_draw): Fix the references to missing gidx data + member to point to cmp_from. + + * xdisp.c: Doc fix for references to gidx data member. + 2008-09-07 Stefan Monnier * buffer.c (Fbuffer_swap_text): Reset window->point markers. diff --git a/src/nsfont.m b/src/nsfont.m index f49cd0ffbda..42507f08eac 100644 --- a/src/nsfont.m +++ b/src/nsfont.m @@ -904,14 +904,14 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y, int hi, lo; char isComposite = 0; /* s->first_glyph->type == COMPOSITE_GLYPH; */ /* FIXME: composition: no vertical displacement is considered. */ - t+= s->gidx; /* advance into composition */ - for (i =0; inchars - s->gidx; i++, t++) + t+= s->cmp_from; /* advance into composition */ + for (i =0; inchars - s->cmp_from; i++, t++) { hi = (*t & 0xFF00) >> 8; lo = *t & 0x00FF; if (isComposite) { - cwidth = s->cmp->offsets[s->gidx++ * 2] - twidth; + cwidth = s->cmp->offsets[s->cmp_from++ * 2] - twidth; } else { @@ -1094,13 +1094,13 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y, [col set]; CGContextSetTextPosition (gcontext, r.origin.x, r.origin.y); - CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->gidx, + CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->cmp_from, advances, len); if (face->overstrike) { CGContextSetTextPosition (gcontext, r.origin.x+0.5, r.origin.y); - CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->gidx, + CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->cmp_from, advances, len); } diff --git a/src/xdisp.c b/src/xdisp.c index 9e351b5c47d..82c9e82effa 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -19532,7 +19532,7 @@ get_glyph_face_and_encoding (f, glyph, char2b, two_byte_p) /* Fill glyph string S with composition components specified by S->cmp. BASE_FACE is the base face of the composition. - S->gidx is the index of the first component for S. + S->cmp_from is the index of the first component for S. OVERLAPS non-zero means S should draw the foreground only, and use its physical height for clipping. See also draw_glyphs. @@ -19547,7 +19547,7 @@ fill_composite_glyph_string (s, base_face, overlaps) { int i; /* For all glyphs of this composition, starting at the offset - S->gidx, until we reach the end of the definition or encounter a + S->cmp_from, until we reach the end of the definition or encounter a glyph that requires the different face, add it to S. */ struct face *face; -- 2.39.5