aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2012-09-17 01:17:31 +0900
committerKenichi Handa2012-09-17 01:17:31 +0900
commit85a43e2ea45592610c43a25468aabef921c709f8 (patch)
tree111b26dfcb95bc9e71e1006b226acc31542a31e7 /src
parentba13e6168a07a085c0ca8e67c91640b84ee0c1fd (diff)
downloademacs-85a43e2ea45592610c43a25468aabef921c709f8.tar.gz
emacs-85a43e2ea45592610c43a25468aabef921c709f8.zip
font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may not covert the last few charactes.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/font.c13
2 files changed, 10 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index cfcd2b0e2f1..be734134adf 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12012-09-17 Kenichi Handa <handa@gnu.org>
2
3 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
4 not covert the last few charactes.
5
12012-09-16 Kenichi Handa <handa@gnu.org> 62012-09-16 Kenichi Handa <handa@gnu.org>
2 7
3 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster 8 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
diff --git a/src/font.c b/src/font.c
index 32194d1bb02..fc970254a62 100644
--- a/src/font.c
+++ b/src/font.c
@@ -4330,10 +4330,10 @@ GSTRING. */)
4330 LGSTRING_SET_GLYPH (gstring, XINT (n), Qnil); 4330 LGSTRING_SET_GLYPH (gstring, XINT (n), Qnil);
4331 4331
4332 /* Check FROM_IDX and TO_IDX of each GLYPH in GSTRING to assure that 4332 /* Check FROM_IDX and TO_IDX of each GLYPH in GSTRING to assure that
4333 GLYPHS covers all characters in GSTRING. More formally, provided 4333 GLYPHS covers all characters (except for the last few ones) in
4334 that NCHARS is the number of characters in GSTRING, N is the 4334 GSTRING. More formally, provided that NCHARS is the number of
4335 number of glyphs, and GLYPHS[i] is the ith glyph, FROM_IDX and 4335 characters in GSTRING and GLYPHS[i] is the ith glyph, FROM_IDX
4336 TO_IDX of each glyph must satisfy these conditions: 4336 and TO_IDX of each glyph must satisfy these conditions:
4337 4337
4338 GLYPHS[0].FROM_IDX == 0 4338 GLYPHS[0].FROM_IDX == 0
4339 GLYPHS[i].FROM_IDX <= GLYPHS[i].TO_IDX 4339 GLYPHS[i].FROM_IDX <= GLYPHS[i].TO_IDX
@@ -4342,8 +4342,7 @@ GSTRING. */)
4342 GLYPHS[i].TO_IDX == GLYPHS[i-1].TO_IDX 4342 GLYPHS[i].TO_IDX == GLYPHS[i-1].TO_IDX
4343 else 4343 else
4344 ;; Be sure to cover all characters. 4344 ;; Be sure to cover all characters.
4345 GLYPHS[i].FROM_IDX == GLYPHS[i-1].TO_IDX + 1 4345 GLYPHS[i].FROM_IDX == GLYPHS[i-1].TO_IDX + 1 */
4346 GLYPHS[N-1].TO_IDX == NCHARS - 1 */
4347 glyph = LGSTRING_GLYPH (gstring, 0); 4346 glyph = LGSTRING_GLYPH (gstring, 0);
4348 from = LGLYPH_FROM (glyph); 4347 from = LGLYPH_FROM (glyph);
4349 to = LGLYPH_TO (glyph); 4348 to = LGLYPH_TO (glyph);
@@ -4362,8 +4361,6 @@ GSTRING. */)
4362 from = LGLYPH_FROM (glyph); 4361 from = LGLYPH_FROM (glyph);
4363 to = LGLYPH_TO (glyph); 4362 to = LGLYPH_TO (glyph);
4364 } 4363 }
4365 if (to != LGSTRING_CHAR_LEN (gstring) - 1)
4366 goto shaper_error;
4367 return composition_gstring_put_cache (gstring, XINT (n)); 4364 return composition_gstring_put_cache (gstring, XINT (n));
4368 4365
4369 shaper_error: 4366 shaper_error: