summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-06-06 15:40:41 +0100
committerTom Hacohen <tom@stosb.com>2013-06-06 15:42:41 +0100
commitf1ba71147e6522d5f5bce48e81bf5f2dab3068d6 (patch)
treeeea3396000461c66a68e454143bb45e252e6f838
parente81edab826dc456d9c0fbad5e5519a44947e78dc (diff)
downloadefl-f1ba71147e6522d5f5bce48e81bf5f2dab3068d6.tar.gz
Evas font: Fixed line size calculation using multiple fonts.
Additional fixes to cc4cf7786595710b5c53a80dd61bc632cf682ac5. There were two problems: 1. Usage of max_ascent instead of ascent. 2. Initialization of the ascent value according to the first font, instead of 0 (as the first font might not even be used).
-rw-r--r--src/lib/evas/canvas/evas_object_text.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c
index 5743322737..ed765fce1c 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -466,14 +466,6 @@ _text_font_set(Eo *eo_obj, void *_pd, va_list *list)
o->font = evas_font_load(obj->layer->evas->evas, o->cur.fdesc, o->cur.source,
(int)(((double) o->cur.size) * obj->cur->scale));
- if (o->font)
- {
- o->ascent = ENFN->font_ascent_get(ENDT, o->font);
- o->descent = ENFN->font_descent_get(ENDT, o->font);
- o->max_ascent = ENFN->font_max_ascent_get(ENDT, o->font);
- o->max_descent = ENFN->font_max_descent_get(ENDT, o->font);
- }
- else
{
o->ascent = 0;
o->descent = 0;
@@ -2420,13 +2412,8 @@ _evas_object_text_recalc(Evas_Object *eo_obj, Eina_Unicode *text)
if (desc > o->descent)
o->descent = desc;
- max_asc = evas_common_font_instance_max_ascent_get(item->text_props.font_instance);
- max_desc = evas_common_font_instance_max_descent_get(item->text_props.font_instance);
-
- if (max_asc > o->max_ascent)
- o->max_ascent = max_asc;
- if (max_desc > o->max_descent)
- o->max_descent = max_desc;
+ o->max_ascent = o->ascent;
+ o->max_descent = o->descent;
}
}