shithub: freetype+ttf2subf

Download patch

ref: 87360a78f3fb20abd34c29d1b363f6e42f57904c
parent: f8555b5d8cdb76134175fc3260e06c8805ede867
author: Werner Lemberg <[email protected]>
date: Fri Apr 4 20:08:52 EDT 2014

[aflatin] Improve comment.

git/fs: mount .git/fs: mount/attach disallowed
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -1355,6 +1355,7 @@
     if ( len_threshold == 0 )
       len_threshold = 1;
 
+    /* a heuristic value to weight lengths */
     len_score = AF_LATIN_CONSTANT( hints->metrics, 6000 );
 
     /* now compare each segment to the others */
@@ -1389,15 +1390,18 @@
             max = seg2->max_coord;
 
           /* compute maximum coordinate difference of the two segments */
+          /* (this is, how much they overlap)                          */
           len = max - min;
           if ( len >= len_threshold )
           {
-            /* small coordinate differences cause a higher score, and     */
-            /* segments with a greater distance cause a higher score also */
+            /* the score is the sum of two values indicating the       */
+            /* `quality' of a fit, measured along the segments' main   */
+            /* axis (`len_score / len') and orthogonal to it (`dist'): */
+            /* smaller overlappings cause a higher score, and segments */
+            /* with a greater distance cause a higher score also       */
             score = dist + len_score / len;
 
             /* and we search for the smallest score */
-            /* of the sum of the two values         */
             if ( score < seg1->score )
             {
               seg1->score = score;