tasn pushed a commit to branch evas-1.7.

commit 44a3c256dfb329c6232069f4abca3047195b3334
Author: Tom Hacohen <[email protected]>
Date:   Wed Jul 17 15:58:54 2013 +0100

    fix bug introduced by: 79bfa9cd10ee64f49008bf3638db77fd2c557552
    
    max ascent/descent are not the same as ascent and descent... get
    them specifically.
    
    A backport of c979a525536fa2aca0ade28a1f3ff77fb4911639 by Carsten.
---
 src/lib/canvas/evas_object_text.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/lib/canvas/evas_object_text.c 
b/src/lib/canvas/evas_object_text.c
index 705741e..696ae70 100644
--- a/src/lib/canvas/evas_object_text.c
+++ b/src/lib/canvas/evas_object_text.c
@@ -1920,26 +1920,27 @@ _evas_object_text_recalc(Evas_Object *obj)
              int asc = 0, desc = 0;
 
              /* Skip items without meaning full information. */
-             if (!item->text_props.font_instance)
-                continue;
+             if (!item->text_props.font_instance) continue;
 
              asc = 
evas_common_font_instance_ascent_get(item->text_props.font_instance);
              desc = 
evas_common_font_instance_descent_get(item->text_props.font_instance);
-             if (asc > o->ascent)
-                o->ascent = asc;
-             if (desc > o->descent)
-                o->descent = desc;
+             if (asc > o->ascent) o->ascent = asc;
+             if (desc > o->descent) o->descent = desc;
+
+             asc = 
evas_common_font_instance_max_ascent_get(item->text_props.font_instance);
+             desc = 
evas_common_font_instance_max_descent_get(item->text_props.font_instance);
+             if (asc > o->max_ascent) o->max_ascent = asc;
+             if (desc > o->max_descent) o->max_descent = desc;
           }
      }
    else 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);
      }
 
-   o->max_ascent = o->ascent;
-   o->max_descent = o->descent;
-
    if ((o->font) && (o->items))
      {
        int w, h;

-- 

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk

Reply via email to