From 5125ddb692441c910b2e45c836d836e7f5f414c1 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sun, 30 Jan 2011 10:38:02 +0000 Subject: [PATCH] Evas textblock: Shape a lot less when splitting to items because of script/bidi direction. SVN revision: 56468 --- .../evas/src/lib/canvas/evas_object_textblock.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c index 6ab469c77e..71a4918ff0 100644 --- a/legacy/evas/src/lib/canvas/evas_object_textblock.c +++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c @@ -2481,6 +2481,7 @@ _layout_text_add_and_split_item(Ctxt *c, Evas_Object_Textblock_Format *fmt, int tw, th, adv, inset; int cutoff, len; + int shape_len = 0; cutoff = 0; @@ -2507,11 +2508,16 @@ _layout_text_add_and_split_item(Ctxt *c, Evas_Object_Textblock_Format *fmt, new_ti->parent.text_pos); evas_common_text_props_script_set (&new_ti->parent.text_props, new_ti->text); - c->ENFN->font_shape(c->ENDT, new_ti->format->font.font, - new_ti->text, - &new_ti->parent.text_props, - new_ti->parent.text_node->bidi_props, - new_ti->parent.text_pos, len - cutoff); + shape_len = len - cutoff; + } + else if (shape_len) + { + c->ENFN->font_shape(c->ENDT, ti->format->font.font, + ti->text, + &ti->parent.text_props, + ti->parent.text_node->bidi_props, + ti->parent.text_pos, shape_len); + shape_len = 0; } }