# HG changeset patch # User Teodor Zlatanov # Date 1220786180 0 # Node ID e77a63e6f9834222cc4db970447e9d103dac70b4 # Parent f52bded946ed75c042fef7ae5a8db064fb3ed398 * 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. diff -r f52bded946ed -r e77a63e6f983 src/ChangeLog --- a/src/ChangeLog Sun Sep 07 09:16:56 2008 +0000 +++ b/src/ChangeLog Sun Sep 07 11:16:20 2008 +0000 @@ -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 -r f52bded946ed -r e77a63e6f983 src/nsfont.m --- a/src/nsfont.m Sun Sep 07 09:16:56 2008 +0000 +++ b/src/nsfont.m Sun Sep 07 11:16:20 2008 +0000 @@ -904,14 +904,14 @@ 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 @@ [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 -r f52bded946ed -r e77a63e6f983 src/xdisp.c --- a/src/xdisp.c Sun Sep 07 09:16:56 2008 +0000 +++ b/src/xdisp.c Sun Sep 07 11:16:20 2008 +0000 @@ -19532,7 +19532,7 @@ /* 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 @@ { 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;