freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] empirical correction to the patch to gray_render_cubic


From: Graham Asher
Subject: [ft-devel] empirical correction to the patch to gray_render_cubic
Date: Wed, 23 Jun 2010 09:30:23 +0100
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)

The patch to gray_render_cubic that I suggested, and which evolved a little after some discussion, appears to be too aggressive in its reduction of the number of passes through the spline-splitting loop. Circles now have noticeable corners. Here is an improvement that fixes the situation. It is empirical only and does not yet rest on theory. Change this code in gray_render_cubic from

   while ( dx > 0 )
   {
     dx >>= 3;
     level++;
   }

to

   while ( dx > 0 )
   {
     dx >>= 2;
     level++;
   }

The difference is that dx is now shifted right by 2, not 3, on each pass. I attach before (left) and after (right) screen shots, taken from a CartoType map, that show the difference. The slight difference in scales in the images is due to my haste.

Best regards,

Graham

PNG image


reply via email to

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