diff options
| author | K. Handa | 2016-01-14 21:48:44 +0900 |
|---|---|---|
| committer | K. Handa | 2016-01-26 23:10:34 +0900 |
| commit | ad879b7f7e049160c45361fe8a12580801ba035b (patch) | |
| tree | db7c489d3b00ab9be6c6203839839e244c1335eb /src | |
| parent | 4a3db0f72955815c41114129129424c3b31ea3eb (diff) | |
| download | emacs-ad879b7f7e049160c45361fe8a12580801ba035b.tar.gz emacs-ad879b7f7e049160c45361fe8a12580801ba035b.zip | |
Backport:fix previous change of src/ftfont.c (ftfont_shape_by_flt)
* src/ftfont.c (ftfont_shape_by_flt): Fix previous change. Access the
second glyph only when there are enough glyphs.
(cherry picked from commit 9835757013569673854b692ccbb58bfb3c3ed1f7)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ftfont.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ftfont.c b/src/ftfont.c index bb8af96d7b1..505d508d2e0 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -2590,7 +2590,7 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font, | |||
| 2590 | flt_font_ft.otf = otf; | 2590 | flt_font_ft.otf = otf; |
| 2591 | flt_font_ft.matrix = matrix->xx != 0 ? matrix : 0; | 2591 | flt_font_ft.matrix = matrix->xx != 0 ? matrix : 0; |
| 2592 | 2592 | ||
| 2593 | if (1 < len || ! otf) | 2593 | if (1 < len) |
| 2594 | { | 2594 | { |
| 2595 | /* A little bit ad hoc. Perhaps, shaper must get script and | 2595 | /* A little bit ad hoc. Perhaps, shaper must get script and |
| 2596 | language information, and select a proper flt for them | 2596 | language information, and select a proper flt for them |
| @@ -2598,9 +2598,11 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font, | |||
| 2598 | int c1 = LGLYPH_CHAR (LGSTRING_GLYPH (lgstring, 1)); | 2598 | int c1 = LGLYPH_CHAR (LGSTRING_GLYPH (lgstring, 1)); |
| 2599 | if (CHAR_HAS_CATEGORY (c1, '^')) | 2599 | if (CHAR_HAS_CATEGORY (c1, '^')) |
| 2600 | flt = mflt_get (msymbol ("combining")); | 2600 | flt = mflt_get (msymbol ("combining")); |
| 2601 | else if (! otf) | 2601 | } |
| 2602 | flt = mflt_find (LGLYPH_CHAR (LGSTRING_GLYPH (lgstring, 0)), | 2602 | if (! flt && ! otf) |
| 2603 | &flt_font_ft.flt_font); | 2603 | { |
| 2604 | flt = mflt_find (LGLYPH_CHAR (LGSTRING_GLYPH (lgstring, 0)), | ||
| 2605 | &flt_font_ft.flt_font); | ||
| 2604 | if (! flt) | 2606 | if (! flt) |
| 2605 | return make_number (0); | 2607 | return make_number (0); |
| 2606 | } | 2608 | } |