From 46b536b347f89139d6944e5c7a28741415bc81f3 Mon Sep 17 00:00:00 2001 From: handa Date: Fri, 7 Sep 2007 08:03:19 +0000 Subject: [PATCH] (compose_glyph_string): Improve script detection. --- src/draw.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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) { -- 1.7.10.4