summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-04-25 15:16:13 +0100
committerTom Hacohen <tom@stosb.com>2013-04-25 15:16:20 +0100
commit455d8790b9d80430f5ea6a96dd213fbc3c03492f (patch)
treea10077b13a24e62b71fed32559653a3c87a07144 /src
parent45b4960e145ea14f4096daf538ca12ddab7ff68a (diff)
Evas textblock: Fixed line size calculation when using multiple fonts.
Thanks to MinSu Seo for reporting.
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c
index 76a9cdb..56d9389 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -3217,6 +3217,17 @@ _layout_line_finalize(Ctxt *c, Evas_Object_Textblock_Format *fmt)
3217 &c->maxdescent, &fi->y, &fi->parent.w, &fi->parent.h); 3217 &c->maxdescent, &fi->y, &fi->parent.w, &fi->parent.h);
3218 fi->parent.adv = fi->parent.w; 3218 fi->parent.adv = fi->parent.w;
3219 } 3219 }
3220 else
3221 {
3222 Evas_Coord asc = 0, desc = 0;
3223 _layout_item_ascent_descent_adjust(c->obj, &asc, &desc,
3224 it, c->position);
3225
3226 if (asc > c->maxascent)
3227 c->maxascent = asc;
3228 if (desc > c->maxdescent)
3229 c->maxdescent = desc;
3230 }
3220 3231
3221loop_advance: 3232loop_advance:
3222 it->x = x; 3233 it->x = x;
@@ -10112,11 +10123,16 @@ _size_native_calc_line_finalize(const Evas_Object *eo_obj, Eina_List *items,
10112 10123
10113 if (it) 10124 if (it)
10114 { 10125 {
10126 Evas_Coord asc = 0, desc = 0;
10115 /* If there are no text items yet, calc ascent/descent 10127 /* If there are no text items yet, calc ascent/descent
10116 * according to the current format. */ 10128 * according to the current format. */
10117 if (*ascent + *descent == 0) 10129 _layout_item_ascent_descent_adjust(eo_obj, &asc, &desc,
10118 _layout_item_ascent_descent_adjust(eo_obj, ascent, descent, 10130 it, position);
10119 it, position); 10131
10132 if (asc > *ascent)
10133 *ascent = asc;
10134 if (desc > *descent)
10135 *descent = desc;
10120 10136
10121 /* Add margins. */ 10137 /* Add margins. */
10122 if (it->format) 10138 if (it->format)