freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] [PATCH] [type1] Ensure mm_axis_unmap() always returns an


From: James Cloos
Subject: Re: [ft-devel] [PATCH] [type1] Ensure mm_axis_unmap() always returns an FT_Fixed
Date: Sat, 29 Nov 2008 12:21:22 -0500
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)

Damn.  That does not fix the bug, just replaces it.

I misunderstood the relationship between blend_points[] and
design_points[].

The blend_points[] are the values from /BlendDesignPositions and the
design_points[] are the ones from /BlendDesignMap.  The default values
ft returns are from /NormDesignVector (which are in /BlendDesignPositions
space) rather than from /DesignVector (which are in /BlendDesignMap space),
but ft normalizes the Norm values to 16.16 values in /BlendDesignMap space.

(Look at the t1disasm(1) output of ZX______.PFB and ZY______.PFB if the
above paragraph is too confusing.)

Instead of the patch I proposed and as committed, I should have proposed:

diff -uNr --show-c-function a/freetype2/src/type1/t1load.c 
b/freetype2/src/type1/t1load.c
--- a/freetype2/src/type1/t1load.c      2008-11-17 15:41:05.858472832 -0500
+++ b/freetype2/src/type1/t1load.c      2008-11-28 16:35:48.014448760 -0500
@@ -230,7 +230,7 @@
 
 
     if ( ncv <= axismap->blend_points[0] )
-      return axismap->design_points[0];
+      return FT_INT_TO_FIXED(axismap->design_points[0]);
 
     for ( j = 1; j < axismap->num_points; ++j )
     {
@@ -249,7 +249,7 @@
       }
     }
 
-    return axismap->design_points[axismap->num_points - 1];
+    return FT_INT_TO_FIXED(axismap->design_points[axismap->num_points - 1]);
   }
 
 

This time compile tested, not just Obviously Correctâ„¢.

-JimC
-- 
James Cloos <address@hidden>         OpenPGP: 1024D/ED7DAEA6




reply via email to

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