From: Kenichi Handa Date: Tue, 9 Sep 2008 02:29:02 +0000 (+0000) Subject: (ftfont_shape_by_flt): Use "combining" FLT for ASCII characters. X-Git-Tag: emacs-pretest-23.0.90~2948 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=da2cf48856067ac62ce4aae07cf9e88596201800;p=emacs.git (ftfont_shape_by_flt): Use "combining" FLT for ASCII characters. --- diff --git a/src/ChangeLog b/src/ChangeLog index 21219613b39..a4fbe0de2a1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2008-09-09 Kenichi Handa + * ftfont.c (ftfont_shape_by_flt): Use "combining" FLT for ASCII + characters. + * composite.c (FORWARD_CHAR): Fix calculation of (POSITION).pos_byte. diff --git a/src/ftfont.c b/src/ftfont.c index a6637fe1287..d6fabf8a86b 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -1813,6 +1813,7 @@ ftfont_shape_by_flt (lgstring, font, ft_face, otf) EMACS_UINT len = LGSTRING_GLYPH_LEN (lgstring); EMACS_UINT i; struct MFLTFontFT flt_font_ft; + MFLT *flt = NULL; if (! m17n_flt_initialized) { @@ -1861,9 +1862,14 @@ ftfont_shape_by_flt (lgstring, font, ft_face, otf) flt_font_ft.font = font; flt_font_ft.ft_face = ft_face; flt_font_ft.otf = otf; + if (ASCII_CHAR_P (gstring.glyphs[0].c)) + /* A little bit ad hoc. Perhaps, shaper must get script and + language information, and select a proper flt for them + here. */ + flt = mflt_get (msymbol ("combining")); for (i = 0; i < 3; i++) { - int result = mflt_run (&gstring, 0, len, &flt_font_ft.flt_font, NULL); + int result = mflt_run (&gstring, 0, len, &flt_font_ft.flt_font, flt); if (result != -2) break; gstring.allocated += gstring.allocated;