On Fri, 2005-12-23 at 12:22 -0500, Jason Tackaberry wrote:
> The problem is that for some fonts, characters that render below the
> baseline (for example, the letter 'g') get clipped by a couple pixels.
> Not all fonts are affected, like for example Vera or Tahoma, but some
> are, like Arial and Times.

I've done a little leg work and determined what change caused the
rendering problem.  This change occurred between 004 and 005.  I've
attached a patch that reverts this code, and it corrects the problem,
and I see no negative side effects.  I'm sure this code was changed for
a reason, but I don't know why.  At any rate, with this patch,
everything looks good here.

The patch is diffed against 1.2.1.009, but it does apply cleanly to cvs.

Cheers,
Jason.
--- imlib2-1.2.1.009.orig/src/lib/font_draw.c	2005-12-30 10:49:31.000000000 -0500
+++ imlib2-1.2.1.009/src/lib/font_draw.c	2005-12-30 10:50:44.000000000 -0500
@@ -77,8 +77,11 @@
    ImlibImage         *im2;
    DATA32             *data, col;
    int                 nx, ny;
+   int                 inset;
 
-   imlib_font_query_advance(fn, text, &w, &h);
+   inset = imlib_font_query_inset(fn, text);
+   imlib_font_query_size(fn, text, &w, &h);
+   w += inset;
 
    data = malloc(w * h * sizeof(DATA32));
    if (!data)

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to