freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] Severe rendering bug


From: Tobias Ringström
Subject: [ft-devel] Severe rendering bug
Date: Fri, 30 Dec 2011 11:37:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

I have encountered a severe rendering bug when rendering DejaVu Sans Book capital R at certain aspect ratios using freetype 2.4.x. It's very obvious for height 64 and width 256. See the attached image.

The problem goes away if I force the auto-hinter on.

The following patch to ftview.c can be used to demonstrate the problem:

diff --git a/src/ftcommon.c b/src/ftcommon.c
index 3ca5bc3..852346b 100644
--- a/src/ftcommon.c
+++ b/src/ftcommon.c
@@ -555,7 +555,7 @@
       if ( char_size > 0xFFFFF )
           char_size = 0xFFFFF;

-      handle->scaler.width  = (FT_UInt) char_size;
+      handle->scaler.width  = (FT_UInt) char_size * 4;
       handle->scaler.height = (FT_UInt) char_size;
       handle->scaler.pixel  = 0;
       handle->scaler.x_res  = (FT_UInt) resolution;

Run ftview like this:

    ./objs/ftview -m R 64 DejaVuSans.ttf

I use the latest DefaVu version 2.33 on a Fedora 16 x86_64 with gcc 4.6.2.

/Tobias

Attachment: bug.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]