{
Evas_Object_Textblock_Item *it, *last_it = NULL;
Eina_List *i;
+ Eina_Bool is_bidi = EINA_FALSE;
it = eina_list_data_get(items);
*w = 0;
/* Add margins. */
if (it->format)
*w = it->format->margin.l + it->format->margin.r;
- }
+ if (it->ln && it->ln->par)
+ is_bidi = it->ln->par->is_bidi;
+ }
/* Adjust all the item sizes according to the final line size,
* and update the x positions of all the items of the line. */
*w += it->adv;
/* Only conditional if we have bidi support, otherwise, just set it. */
+ if (it->w > 0)
+ {
#ifdef BIDI_SUPPORT
- if (!last_it || (it->visual_pos > last_it->visual_pos))
+ if (is_bidi)
+ {
+ if (!last_it || (it->visual_pos > last_it->visual_pos))
+ {
+ last_it = it;
+ }
+ }
+ else
#endif
- {
- last_it = it;
+ {
+ last_it = it;
+ }
}
}
EINA_INLIST_FOREACH(o->paragraphs, par)
{
Evas_Coord tw, th;
+ _layout_paragraph_render(o, par);
_size_native_calc_paragraph_size(eo_obj, o, par, &position, &tw, &th);
if (tw > wmax)
wmax = tw;
fail_if((w != nw) || (h != nh));
fail_if(w <= 0);
+ evas_object_textblock_text_markup_set(tb, "i<b>。</b>");
+ evas_object_textblock_size_formatted_get(tb, &w, &h);
+ evas_object_textblock_size_native_get(tb, &nw, &nh);
+ ck_assert_int_eq(w, nw);
+ ck_assert_int_eq(h, nh);
+
+ evas_object_textblock_text_markup_set(tb, "。<b>i</b>");
+ evas_object_textblock_size_formatted_get(tb, &w, &h);
+ evas_object_textblock_size_native_get(tb, &nw, &nh);
+ ck_assert_int_eq(w, nw);
+ ck_assert_int_eq(h, nh);
+
/* This time with margins. */
{
Evas_Textblock_Style *newst;