Evas textblock: Fixed line size calculation when using multiple fonts.

Thanks to MinSu Seo for reporting.
This commit is contained in:
Tom Hacohen 2013-04-25 15:16:13 +01:00
parent 45b4960e14
commit 455d8790b9
3 changed files with 25 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2013-04-25 Tom Hacohen
* Evas textblock: Fixed line size calculation when using multiple
fonts.
2013-04-25 Jihoon Kim
* Edje entry: remove duplicated ecore_imf_context_reset in adjusting the selection

1
NEWS
View File

@ -255,3 +255,4 @@ Fixes:
* Edje: When selected word exists, selection is cleared and cursor remains on the current entry by additional key input.
* Ecore-X: Fix selection parser to not overrun buffer read by using longs on 64bit.
* Evas: Fix recursive proxy image rendering to just render black
* Evas textblock: Fixed line size calculation when using multiple fonts.

View File

@ -3217,6 +3217,17 @@ _layout_line_finalize(Ctxt *c, Evas_Object_Textblock_Format *fmt)
&c->maxdescent, &fi->y, &fi->parent.w, &fi->parent.h);
fi->parent.adv = fi->parent.w;
}
else
{
Evas_Coord asc = 0, desc = 0;
_layout_item_ascent_descent_adjust(c->obj, &asc, &desc,
it, c->position);
if (asc > c->maxascent)
c->maxascent = asc;
if (desc > c->maxdescent)
c->maxdescent = desc;
}
loop_advance:
it->x = x;
@ -10112,11 +10123,16 @@ _size_native_calc_line_finalize(const Evas_Object *eo_obj, Eina_List *items,
if (it)
{
Evas_Coord asc = 0, desc = 0;
/* If there are no text items yet, calc ascent/descent
* according to the current format. */
if (*ascent + *descent == 0)
_layout_item_ascent_descent_adjust(eo_obj, ascent, descent,
it, position);
_layout_item_ascent_descent_adjust(eo_obj, &asc, &desc,
it, position);
if (asc > *ascent)
*ascent = asc;
if (desc > *descent)
*descent = desc;
/* Add margins. */
if (it->format)