From: handa Date: Fri, 7 Sep 2007 08:03:19 +0000 (+0000) Subject: (compose_glyph_string): Improve script detection. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=46b536b347f89139d6944e5c7a28741415bc81f3;p=m17n%2Fm17n-lib.git (compose_glyph_string): Improve script detection. --- diff --git a/src/draw.c b/src/draw.c index 041bac8..5709638 100644 --- a/src/draw.c +++ b/src/draw.c @@ -369,8 +369,16 @@ compose_glyph_string (MFrame *frame, MText *mt, int from, int to, { this_script = (MSymbol) mchar_get_prop (c, Mscript); if (this_script == Minherited || this_script == Mcommon) - this_script = script; - if (this_script == Mcommon) + { + if (g > MGLYPH (1)) + { + MSymbol category = mchar_get_prop (g[-1].c, Mcategory); + + if (MSYMBOL_NAME (category)[0] != 'Z') + this_script = script; + } + } + if (this_script == Mcommon && non_latin_script) this_script = non_latin_script; if (this_script == Mcommon) {