]> git.eshelyaron.com Git - emacs.git/commitdiff
fix previous change of src/ftfont.c (ftfont_shape_by_flt)
authorK. Handa <handa@gnu.org>
Thu, 14 Jan 2016 12:48:44 +0000 (21:48 +0900)
committerK. Handa <handa@gnu.org>
Thu, 14 Jan 2016 12:48:44 +0000 (21:48 +0900)
* src/ftfont.c (ftfont_shape_by_flt): Fix previous change.  Access the
second glyph only when there are enough glyphs.

src/ftfont.c

index 575bf53701cc1bedd035a0f0c3762c3ab539242a..c10f4f90c731fee4488bddb7b4b7b3229ebe6783 100644 (file)
@@ -2590,7 +2590,7 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font,
   flt_font_ft.otf = otf;
   flt_font_ft.matrix = matrix->xx != 0 ? matrix : 0;
 
-  if (1 < len || ! otf)
+  if (1 < len)
     {
       /* A little bit ad hoc.  Perhaps, shaper must get script and
         language information, and select a proper flt for them
@@ -2598,9 +2598,11 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font,
       int c1 = LGLYPH_CHAR (LGSTRING_GLYPH (lgstring, 1));
       if (CHAR_HAS_CATEGORY (c1, '^'))
        flt = mflt_get (msymbol ("combining"));
-      else if (! otf)
-       flt = mflt_find (LGLYPH_CHAR (LGSTRING_GLYPH (lgstring, 0)),
-                        &flt_font_ft.flt_font);
+    }
+  if (! flt && ! otf)
+    {
+      flt = mflt_find (LGLYPH_CHAR (LGSTRING_GLYPH (lgstring, 0)),
+                      &flt_font_ft.flt_font);
       if (! flt)
        return make_number (0);
     }