I know they are not the same. However I don't see how getting the font's 
bounding box (what's done in the max ascent/descent functions) is any 
better than getting the font's requested ascent/descent.

What issue have you noticed?

The bounding box looked wayyyy too big, that's why I adjusted that. Do 
you have any reference to why getting the font's bounding box and 
calculating according to that is better?

--
Tom.

On 09/06/13 09:16, Carsten Haitzler - Enlightenment Git (Rasterman) wrote:
> raster pushed a commit to branch master.
>
> commit c979a525536fa2aca0ade28a1f3ff77fb4911639
> Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
> Date:   Sun Jun 9 17:30:34 2013 +0900
>
>      fix bug introduced by: f1ba71147e6522d5f5bce48e81bf5f2dab3068d6
>
>      max ascent/descent are not the same as ascent and descent... get them
>      specifically.
> ---
>   src/lib/evas/canvas/evas_object_text.c | 18 +++++++++---------
>   1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/src/lib/evas/canvas/evas_object_text.c 
> b/src/lib/evas/canvas/evas_object_text.c
> index 35881bb..932603b 100644
> --- a/src/lib/evas/canvas/evas_object_text.c
> +++ b/src/lib/evas/canvas/evas_object_text.c
> @@ -2402,27 +2402,27 @@ _evas_object_text_recalc(Evas_Object *eo_obj, 
> Eina_Unicode *text)
>                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;
>


------------------------------------------------------------------------------
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
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to