* 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.
This commit is contained in:
Teodor Zlatanov 2008-09-07 11:16:20 +00:00
parent d21cba62f0
commit 93c7fcf88a
3 changed files with 14 additions and 7 deletions

View file

@ -1,3 +1,10 @@
2008-09-07 Teodor Zlatanov <tzz@lifelogs.com>
* 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 <monnier@iro.umontreal.ca>
* buffer.c (Fbuffer_swap_text): Reset window->point markers.

View file

@ -904,14 +904,14 @@ WITH_BACKGROUND is zero when (FROM > 0 || TO < S->nchars). */
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; i<s->nchars - s->gidx; i++, t++)
t+= s->cmp_from; /* advance into composition */
for (i =0; i<s->nchars - 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 @@ WITH_BACKGROUND is zero when (FROM > 0 || TO < S->nchars). */
[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);
}

View file

@ -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;