On Mon, 01 Mar 2010 03:23:09 +0600 Mikhail Gusarov <[email protected]>
said:
in svn - with a small added check (make sure ascent+descent > 0)
>
> Here's the proposed patch for Evas which removes extra checks and makes
> it possible to reduce line spacing in Textblock (previously it was only
> possible to make it bigger than default, and default gave me 34px with
> 14px-tall DejaVu Sans Condensed and cyrillic letters).
>
> ---
> trunk/evas/src/lib/canvas/evas_object_textblock.c | 11 ++++-------
> 1 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/trunk/evas/src/lib/canvas/evas_object_textblock.c
> b/trunk/evas/src/lib/canvas/evas_object_textblock.c index 30be18d..b2d8903
> 100644
> --- a/trunk/evas/src/lib/canvas/evas_object_textblock.c
> +++ b/trunk/evas/src/lib/canvas/evas_object_textblock.c
> @@ -1306,19 +1306,16 @@ _layout_format_ascent_descent_adjust(Ctxt *c,
> Evas_Object_Textblock_Format *fmt) descent = c->ENFN->font_max_descent_get
> (c->ENDT, fmt->font.font); if (fmt->linesize > 0)
> {
> - if ((ascent + descent) < fmt->linesize)
> - {
> - ascent = ((fmt->linesize * ascent) / (ascent + descent));
> - descent = fmt->linesize - ascent;
> - }
> + ascent = ((fmt->linesize * ascent) / (ascent + descent));
> + descent = fmt->linesize - ascent;
> }
> else if (fmt->linerelsize > 0.0)
> {
> descent = ((ascent + descent) * fmt->linerelsize) - (ascent *
> fmt->linerelsize); ascent = ascent * fmt->linerelsize;
> }
> - if (c->maxascent < ascent) c->maxascent = ascent;
> - if (c->maxdescent < descent) c->maxdescent = descent;
> + c->maxascent = ascent;
> + c->maxdescent = descent;
> }
> }
>
> --
> 1.6.3.3
>
>
>
> --
> http://fossarchy.blogspot.com/
>
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) [email protected]
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel