Jason Tackaberry wrote:
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)

!!! Please do not apply this patch. !!!

Raster already did this once (cvs version 1.1 -> 1.2). Because it is not the proper fix and it causes trouble in e16 I reverted it (cvs version 1.2 -> 1.3). I think you are right that something is wrong somewhere around here. However, this patch breaks stuff for certain fonts (w becomes too small, IIRC).

/Kim



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to