#ifdef BIDI_SUPPORT
size_t visual_pos;
#endif
- Evas_Coord x, w, h;
+ Evas_Coord adv, x, w, h;
Evas_BiDi_Props bidi_props;
};
* @param line the line to reorder
*/
static void
-_layout_line_reorder(Ctxt *c, Evas_Object_Textblock_Line *line)
+_layout_line_reorder(Ctxt *c __UNUSED__, Evas_Object_Textblock_Line *line)
{
/*FIXME: do it a bit more efficient - not very efficient ATM. */
Evas_Object_Textblock_Item *it;
while (it)
{
it->x = x;
- if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
- {
- int adv = 0;
- Evas_Object_Textblock_Text_Item *ti = ti =_ITEM_TEXT(it);
- if (ti->format->font.font)
- {
- adv = c->ENFN->font_h_advance_get(c->ENDT,
- ti->format->font.font, ti->text,
- &ti->parent.bidi_props);
- }
-
- x += adv;
- }
- else
- {
- x += it->w;
- }
+ x += it->adv;
it = (Evas_Object_Textblock_Item *) EINA_INLIST_GET(it)->next;
}
}
ti->text, &ti->parent.bidi_props, &tw, &th);
it->w = tw;
it->h = th;
+ it->adv = adv;
c->x = it->x + adv;
return EINA_TRUE;
}
if (fmt->font.font)
adv = c->ENFN->font_h_advance_get(c->ENDT, fmt->font.font,
ti->text, &ti->parent.bidi_props);
+ ti->parent.adv = adv;
c->x += adv;
c->ln->items = (Evas_Object_Textblock_Item *)
eina_inlist_append(EINA_INLIST_GET(c->ln->items),
fi->vsize = vsize;
fi->size = size;
fi->formatme = 1;
- fi->parent.w = w;
+ fi->parent.w = fi->parent.adv = w; /* For formats items it's usually
+ the same, we don't handle the
+ special cases yet. */
fi->parent.h = h;
fi->ascent = c->maxascent;
fi->descent = c->maxdescent;
fi = _layout_format_item_add(c, n, item);
fi->parent.x = c->x;
- fi->parent.w = 0;
+ fi->parent.w = fi->parent.adv = 0;
_layout_line_advance(c, fmt);
}
fi = _layout_format_item_add(c, n, item);
fi->parent.x = c->x;
- fi->parent.w = 0;
+ fi->parent.w = fi->parent.adv = 0;
_layout_line_advance(c, fmt);
}
else if ((!strcmp(item, "\t")) || (!strcmp(item, "\\t")))
}
fi = _layout_format_item_add(c, n, item);
fi->parent.x = c->x;
- fi->parent.w = x2 - c->x;
+ fi->parent.w = fi->parent.adv = x2 - c->x;
fi->formatme = 1;
c->x = x2;
}
else
#endif
{
- *w = it->w - *x;
+ *w = it->adv - *x;
}
}
else
if (evas_bidi_is_rtl_char(&it->bidi_props, 0))
{
*x = *x + *w;
- *w = it->w - *x;
+ *w = it->adv - *x;
}
else
#endif
while (it && (it != it2))
{
- max_x = it->x + it->w;
+ max_x = it->x + it->adv;
it = (Evas_Object_Textblock_Item *) EINA_INLIST_GET(it)->next;
}
if (min_x != max_x)