freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] [Patch] Compensate blue zone rounding after scale


From: Just Fill Bugs
Subject: Re: [ft-devel] [Patch] Compensate blue zone rounding after scale
Date: Sat, 14 May 2011 02:29:09 +0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110422 Shredder/3.1.11pre

On 05/13/2011 09:01 PM, Алексей Подтележников wrote:
Why do you even create and calculate temporary shoot_delta?
You can explicitly increment/decrement blue->shoot.fit the same way
you do blue->ref.fit.
Like this:

+        AF_CJKBlue  blue;
+
+        if ( delta_t>= delta_b )
+        {
+          blue =&axis->blues[AF_CJK_BLUE_TOP];
+          blue->ref.fit += 64;
+          blue->shoot.fit += 64;
+        }
+        else
+        {
+          blue =&axis->blues[AF_CJK_BLUE_BOTTOM];
+          blue->ref.fit -= 64;
+          blue->shoot -= 64;
+        }


Actually, there was an bug. My intention was to only update shoot.fit value if it is the same with the ref.fit. Otherwise, if shoot and ref don't merge, we don't know if shoot should be compensate.

But in the code, it's somehow messed up and simply always update the shoot value.

It should be:

+        if (shoot_delta == 0)
+          blue->shoot.fit = blue->ref.fit;

As for the redundancy of the test on delta_sum <= 64, you are also right. I remove that too in the updated patch.


Attachment: cjk-bluezone-compensate-scale-v2.patch
Description: Text Data


reply via email to

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