aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTeodor Zlatanov2008-09-07 11:16:20 +0000
committerTeodor Zlatanov2008-09-07 11:16:20 +0000
commit93c7fcf88a9c3a61380fc9a7aee67b3f627212d1 (patch)
tree847cd341db9595992849abfe5e26f1097111d2d5 /src
parentd21cba62f0b647ad7ec7ac298f0dae59e06bc381 (diff)
downloademacs-93c7fcf88a9c3a61380fc9a7aee67b3f627212d1.tar.gz
emacs-93c7fcf88a9c3a61380fc9a7aee67b3f627212d1.zip
* 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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/nsfont.m10
-rw-r--r--src/xdisp.c4
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 @@
12008-09-07 Teodor Zlatanov <tzz@lifelogs.com>
2
3 * nsfont.m (nsfont_draw): Fix the references to missing gidx data
4 member to point to cmp_from.
5
6 * xdisp.c: Doc fix for references to gidx data member.
7
12008-09-07 Stefan Monnier <monnier@iro.umontreal.ca> 82008-09-07 Stefan Monnier <monnier@iro.umontreal.ca>
2 9
3 * buffer.c (Fbuffer_swap_text): Reset window->point markers. 10 * 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,
904 int hi, lo; 904 int hi, lo;
905 char isComposite = 0; /* s->first_glyph->type == COMPOSITE_GLYPH; */ 905 char isComposite = 0; /* s->first_glyph->type == COMPOSITE_GLYPH; */
906 /* FIXME: composition: no vertical displacement is considered. */ 906 /* FIXME: composition: no vertical displacement is considered. */
907 t+= s->gidx; /* advance into composition */ 907 t+= s->cmp_from; /* advance into composition */
908 for (i =0; i<s->nchars - s->gidx; i++, t++) 908 for (i =0; i<s->nchars - s->cmp_from; i++, t++)
909 { 909 {
910 hi = (*t & 0xFF00) >> 8; 910 hi = (*t & 0xFF00) >> 8;
911 lo = *t & 0x00FF; 911 lo = *t & 0x00FF;
912 if (isComposite) 912 if (isComposite)
913 { 913 {
914 cwidth = s->cmp->offsets[s->gidx++ * 2] - twidth; 914 cwidth = s->cmp->offsets[s->cmp_from++ * 2] - twidth;
915 } 915 }
916 else 916 else
917 { 917 {
@@ -1094,13 +1094,13 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
1094 [col set]; 1094 [col set];
1095 1095
1096 CGContextSetTextPosition (gcontext, r.origin.x, r.origin.y); 1096 CGContextSetTextPosition (gcontext, r.origin.x, r.origin.y);
1097 CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->gidx, 1097 CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->cmp_from,
1098 advances, len); 1098 advances, len);
1099 1099
1100 if (face->overstrike) 1100 if (face->overstrike)
1101 { 1101 {
1102 CGContextSetTextPosition (gcontext, r.origin.x+0.5, r.origin.y); 1102 CGContextSetTextPosition (gcontext, r.origin.x+0.5, r.origin.y);
1103 CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->gidx, 1103 CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->cmp_from,
1104 advances, len); 1104 advances, len);
1105 } 1105 }
1106 1106
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)
19532/* Fill glyph string S with composition components specified by S->cmp. 19532/* Fill glyph string S with composition components specified by S->cmp.
19533 19533
19534 BASE_FACE is the base face of the composition. 19534 BASE_FACE is the base face of the composition.
19535 S->gidx is the index of the first component for S. 19535 S->cmp_from is the index of the first component for S.
19536 19536
19537 OVERLAPS non-zero means S should draw the foreground only, and use 19537 OVERLAPS non-zero means S should draw the foreground only, and use
19538 its physical height for clipping. See also draw_glyphs. 19538 its physical height for clipping. See also draw_glyphs.
@@ -19547,7 +19547,7 @@ fill_composite_glyph_string (s, base_face, overlaps)
19547{ 19547{
19548 int i; 19548 int i;
19549 /* For all glyphs of this composition, starting at the offset 19549 /* For all glyphs of this composition, starting at the offset
19550 S->gidx, until we reach the end of the definition or encounter a 19550 S->cmp_from, until we reach the end of the definition or encounter a
19551 glyph that requires the different face, add it to S. */ 19551 glyph that requires the different face, add it to S. */
19552 struct face *face; 19552 struct face *face;
19553 19553