/* FIXME: We currently leak ellipsis items. */
static Evas_Object_Text_Item *
-_layout_ellipsis_item_new(Evas_Object_Protected_Data *obj, Evas_Object_Text *o, Evas_Object_Text_Item *ti)
+_layout_ellipsis_item_new(Evas_Object_Protected_Data *obj, Evas_Object_Text *o)
{
Evas_Object_Text_Item *ellip_ti;
+ Evas_Script_Type script;
+ Evas_Font_Instance *script_fi = NULL, *cur_fi;
size_t len = 1; /* The length of _ellip_str */
- ellip_ti = _evas_object_text_item_new(obj, o, ti->text_props.font_instance,
- _ellip_str, ti->text_props.script, 0, 0, len);
+ script = evas_common_language_script_type_get(_ellip_str, 1);
+
+ if (o->font)
+ {
+ (void) ENFN->font_run_end_get(ENDT, o->font, &script_fi, &cur_fi,
+ script, _ellip_str, 1);
+ }
+
+ ellip_ti = _evas_object_text_item_new(obj, o, cur_fi,
+ _ellip_str, script, 0, 0, len);
return ellip_ti;
}
}
else
{
- start_ellip_it = _layout_ellipsis_item_new(obj, o, o->items);
+ start_ellip_it = _layout_ellipsis_item_new(obj, o);
}
o->last_computed.ellipsis_start = start_ellip_it;
ellip_frame -= start_ellip_it->adv;
}
else
{
- end_ellip_it = _layout_ellipsis_item_new(obj, o, o->items);
+ end_ellip_it = _layout_ellipsis_item_new(obj, o);
}
o->last_computed.ellipsis_end = end_ellip_it;
ellip_frame -= end_ellip_it->adv;