Evas textblock: Shape per string and not per item. I.e shaping across wrapping will also work now.

SVN revision: 56411
This commit is contained in:
Tom Hacohen 2011-01-30 10:31:51 +00:00
parent 53123a7445
commit aa6849b76e
1 changed files with 9 additions and 4 deletions

View File

@ -2606,6 +2606,7 @@ _layout_text_append(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Text
/* Use the string, just cut the relevant parts */
else
{
Evas_BiDi_Props props;
str = eina_ustrbuf_string_get(n->unicode);
alloc_str = eina_unicode_strdup(str + start);
@ -2614,6 +2615,13 @@ _layout_text_append(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Text
alloc_str[off] = 0;
}
str = alloc_str;
/* Shape the string */
props.start = start;
props.props = n->bidi_props;
# ifdef BIDI_SUPPORT
evas_bidi_shape_string(alloc_str, &props, off);
# endif
}
}
@ -2622,6 +2630,7 @@ skip:
new_line = 0;
empty_item = 0;
while (str)
{
/* if this is the first line item and it starts with spaces - remove them */
@ -2635,10 +2644,6 @@ skip:
{
ti->bidi_props.start = ti->parent.text_pos;
ti->bidi_props.props = ti->parent.text_node->bidi_props;
# ifdef BIDI_SUPPORT
evas_bidi_shape_string(ti->text, &ti->bidi_props,
eina_unicode_strlen(ti->text));
# endif
}
tw = th = 0;
if (fmt->font.font)