From: tasn Date: Wed, 4 May 2011 08:46:17 +0000 (+0000) Subject: Evas font: only "bidi-shape" RTL strings. X-Git-Tag: submit/trunk/20120815.174732~1542 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6bc00b9a83d016aaae04b5d8a66f6dfed232c597;p=profile%2Fivi%2Fevas.git Evas font: only "bidi-shape" RTL strings. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@59183 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/engines/common/evas_text_utils.c b/src/lib/engines/common/evas_text_utils.c index adec51d..f30899f 100644 --- a/src/lib/engines/common/evas_text_utils.c +++ b/src/lib/engines/common/evas_text_utils.c @@ -289,9 +289,12 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text, Evas_Coord pen_x = 0; int adv_d, i; #if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT) - Eina_Unicode *base_str; - text = base_str = eina_unicode_strndup(text, len); - evas_bidi_shape_string(base_str, par_props, par_pos, len); + Eina_Unicode *base_str = NULL; + if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) + { + text = base_str = eina_unicode_strndup(text, len); + evas_bidi_shape_string(base_str, par_props, par_pos, len); + } #else (void) par_props; (void) par_pos; @@ -375,7 +378,8 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text, } text_props->len = len; # if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT) - free(base_str); + if (base_str) + free(base_str); # endif #endif text_props->text_len = len;