tasn pushed a commit to branch evas-1.7.

commit 79bfa9cd10ee64f49008bf3638db77fd2c557552
Author: Tom Hacohen <[email protected]>
Date:   Thu Jun 6 15:44:51 2013 +0100

    Evas font: Fixed line size calculation using multiple fonts.
    
    Additional fixes to 194b23151180c7c25252849fc477ff1440d76101.
    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).
---
 src/lib/canvas/evas_object_text.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/src/lib/canvas/evas_object_text.c 
b/src/lib/canvas/evas_object_text.c
index 76aff68..6d71c9c 100644
--- a/src/lib/canvas/evas_object_text.c
+++ b/src/lib/canvas/evas_object_text.c
@@ -363,14 +363,6 @@ evas_object_text_font_set(Evas_Object *obj, const char 
*font, Evas_Font_Size siz
 
    o->font = evas_font_load(obj->layer->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;
@@ -1938,13 +1930,8 @@ _evas_object_text_recalc(Evas_Object *obj)
              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;
           }
      }
 

-- 

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j

Reply via email to