shithub: freetype+ttf2subf

Download patch

ref: 75efc2d0bdd07ea689aa7ee3d41c0c1928435e14
parent: 34efe05ce094f9548a201f2afe82583eb85275b2
author: Werner Lemberg <[email protected]>
date: Sat Oct 19 17:46:03 EDT 2013

[autofit] s/SMALL_TOP/X_HEIGHT/.

* src/autofit/afblue.dat: Updated.

* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.

* src/autofit/aflatin.c, src/autofit/aflatin.h,
src/autofit/atlatin2.c: Updated.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2013-10-19  Werner Lemberg  <[email protected]>
 
+	[autofit] s/SMALL_TOP/X_HEIGHT/.
+
+	* src/autofit/afblue.dat: Updated.
+
+	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
+
+	* src/autofit/aflatin.c, src/autofit/aflatin.h,
+	src/autofit/atlatin2.c: Updated.
+
+2013-10-19  Werner Lemberg  <[email protected]>
+
 	* src/autofit/afblue.dat: s/MINOR/DESCENDER/.
 
 	* src/autofit/afblue.c, src/autofit/afblue.h: Regenerated.
--- a/src/autofit/afblue.c
+++ b/src/autofit/afblue.c
@@ -113,29 +113,29 @@
   af_blue_stringsets[] =
   {
     /* */
-    { AF_BLUE_STRING_LATIN_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP         },
-    { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM,  0                                  },
-    { AF_BLUE_STRING_LATIN_SMALL_F_TOP,     AF_BLUE_PROPERTY_LATIN_TOP         },
-    { AF_BLUE_STRING_LATIN_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP       |
-                                            AF_BLUE_PROPERTY_LATIN_SMALL_TOP   },
-    { AF_BLUE_STRING_LATIN_SMALL,           0                                  },
-    { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0                                  },
-    { AF_BLUE_STRING_MAX,                   0                                  },
-    { AF_BLUE_STRING_GREEK_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP         },
-    { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM,  0                                  },
-    { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP,  AF_BLUE_PROPERTY_LATIN_TOP         },
-    { AF_BLUE_STRING_GREEK_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP       |
-                                            AF_BLUE_PROPERTY_LATIN_SMALL_TOP   },
-    { AF_BLUE_STRING_GREEK_SMALL,           0                                  },
-    { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0                                  },
-    { AF_BLUE_STRING_MAX,                   0                                  },
-    { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP         },
-    { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM,  0                                  },
-    { AF_BLUE_STRING_CYRILLIC_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP       |
-                                               AF_BLUE_PROPERTY_LATIN_SMALL_TOP   },
-    { AF_BLUE_STRING_CYRILLIC_SMALL,           0                                  },
-    { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0                                  },
-    { AF_BLUE_STRING_MAX,                      0                                  },
+    { AF_BLUE_STRING_LATIN_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM,  0                                 },
+    { AF_BLUE_STRING_LATIN_SMALL_F_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_LATIN_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP      |
+                                            AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },
+    { AF_BLUE_STRING_LATIN_SMALL,           0                                 },
+    { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0                                 },
+    { AF_BLUE_STRING_MAX,                   0                                 },
+    { AF_BLUE_STRING_GREEK_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM,  0                                 },
+    { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP,  AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_GREEK_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP      |
+                                            AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },
+    { AF_BLUE_STRING_GREEK_SMALL,           0                                 },
+    { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0                                 },
+    { AF_BLUE_STRING_MAX,                   0                                 },
+    { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        },
+    { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM,  0                                 },
+    { AF_BLUE_STRING_CYRILLIC_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP      |
+                                               AF_BLUE_PROPERTY_LATIN_X_HEIGHT   },
+    { AF_BLUE_STRING_CYRILLIC_SMALL,           0                                 },
+    { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0                                 },
+    { AF_BLUE_STRING_MAX,                      0                                 },
     { AF_BLUE_STRING_HEBREW_TOP,       AF_BLUE_PROPERTY_LATIN_TOP  |
                                        AF_BLUE_PROPERTY_LATIN_LONG   },
     { AF_BLUE_STRING_HEBREW_BOTTOM,    0                             },
--- a/src/autofit/afblue.dat
+++ b/src/autofit/afblue.dat
@@ -157,33 +157,33 @@
 AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
 
   AF_BLUE_STRINGSET_LATN
-    { AF_BLUE_STRING_LATIN_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP         }
-    { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM,  0                                  }
-    { AF_BLUE_STRING_LATIN_SMALL_F_TOP,     AF_BLUE_PROPERTY_LATIN_TOP         }
-    { AF_BLUE_STRING_LATIN_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP       |
-                                            AF_BLUE_PROPERTY_LATIN_SMALL_TOP   }
-    { AF_BLUE_STRING_LATIN_SMALL,           0                                  }
-    { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0                                  }
-    { AF_BLUE_STRING_MAX,                   0                                  }
+    { AF_BLUE_STRING_LATIN_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM,  0                                 }
+    { AF_BLUE_STRING_LATIN_SMALL_F_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_LATIN_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP      |
+                                            AF_BLUE_PROPERTY_LATIN_X_HEIGHT   }
+    { AF_BLUE_STRING_LATIN_SMALL,           0                                 }
+    { AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0                                 }
+    { AF_BLUE_STRING_MAX,                   0                                 }
 
   AF_BLUE_STRINGSET_GREK
-    { AF_BLUE_STRING_GREEK_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP         }
-    { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM,  0                                  }
-    { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP,  AF_BLUE_PROPERTY_LATIN_TOP         }
-    { AF_BLUE_STRING_GREEK_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP       |
-                                            AF_BLUE_PROPERTY_LATIN_SMALL_TOP   }
-    { AF_BLUE_STRING_GREEK_SMALL,           0                                  }
-    { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0                                  }
-    { AF_BLUE_STRING_MAX,                   0                                  }
+    { AF_BLUE_STRING_GREEK_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM,  0                                 }
+    { AF_BLUE_STRING_GREEK_SMALL_BETA_TOP,  AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_GREEK_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP      |
+                                            AF_BLUE_PROPERTY_LATIN_X_HEIGHT   }
+    { AF_BLUE_STRING_GREEK_SMALL,           0                                 }
+    { AF_BLUE_STRING_GREEK_SMALL_DESCENDER, 0                                 }
+    { AF_BLUE_STRING_MAX,                   0                                 }
 
   AF_BLUE_STRINGSET_CYRL
-    { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP         }
-    { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM,  0                                  }
-    { AF_BLUE_STRING_CYRILLIC_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP       |
-                                               AF_BLUE_PROPERTY_LATIN_SMALL_TOP   }
-    { AF_BLUE_STRING_CYRILLIC_SMALL,           0                                  }
-    { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0                                  }
-    { AF_BLUE_STRING_MAX,                      0                                  }
+    { AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP,     AF_BLUE_PROPERTY_LATIN_TOP        }
+    { AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM,  0                                 }
+    { AF_BLUE_STRING_CYRILLIC_SMALL,           AF_BLUE_PROPERTY_LATIN_TOP      |
+                                               AF_BLUE_PROPERTY_LATIN_X_HEIGHT   }
+    { AF_BLUE_STRING_CYRILLIC_SMALL,           0                                 }
+    { AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER, 0                                 }
+    { AF_BLUE_STRING_MAX,                      0                                 }
 
   AF_BLUE_STRINGSET_HEBR
     { AF_BLUE_STRING_HEBREW_TOP,       AF_BLUE_PROPERTY_LATIN_TOP  |
--- a/src/autofit/afblue.h
+++ b/src/autofit/afblue.h
@@ -136,9 +136,9 @@
   /* Properties are specific to a writing system.  We assume that a given  */
   /* blue string can't be used in more than a single writing system, which */
   /* is a safe bet.                                                        */
-#define AF_BLUE_PROPERTY_LATIN_TOP        ( 1 << 0 )
-#define AF_BLUE_PROPERTY_LATIN_SMALL_TOP  ( 1 << 1 )
-#define AF_BLUE_PROPERTY_LATIN_LONG       ( 1 << 2 )
+#define AF_BLUE_PROPERTY_LATIN_TOP       ( 1 << 0 )
+#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT  ( 1 << 1 )
+#define AF_BLUE_PROPERTY_LATIN_LONG      ( 1 << 2 )
 
 #define AF_BLUE_PROPERTY_CJK_HORIZ  ( 1 << 0 )
 #define AF_BLUE_PROPERTY_CJK_TOP    ( 1 << 1 )
--- a/src/autofit/afblue.hin
+++ b/src/autofit/afblue.hin
@@ -96,9 +96,9 @@
   /* Properties are specific to a writing system.  We assume that a given  */
   /* blue string can't be used in more than a single writing system, which */
   /* is a safe bet.                                                        */
-#define AF_BLUE_PROPERTY_LATIN_TOP        ( 1 << 0 )
-#define AF_BLUE_PROPERTY_LATIN_SMALL_TOP  ( 1 << 1 )
-#define AF_BLUE_PROPERTY_LATIN_LONG       ( 1 << 2 )
+#define AF_BLUE_PROPERTY_LATIN_TOP       ( 1 << 0 )
+#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT  ( 1 << 1 )
+#define AF_BLUE_PROPERTY_LATIN_LONG      ( 1 << 2 )
 
 #define AF_BLUE_PROPERTY_CJK_HORIZ  ( 1 << 0 )
 #define AF_BLUE_PROPERTY_CJK_TOP    ( 1 << 1 )
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -249,7 +249,7 @@
             have_flag = 1;
           }
 
-          if ( AF_LATIN_IS_SMALL_TOP_BLUE( bs ) )
+          if ( AF_LATIN_IS_X_HEIGHT_BLUE( bs ) )
           {
             if ( have_flag )
               FT_TRACE5(( ", " ));
@@ -705,7 +705,7 @@
        * in order to optimize the pixel grid alignment of the top of small
        * letters.
        */
-      if ( AF_LATIN_IS_SMALL_TOP_BLUE( bs ) )
+      if ( AF_LATIN_IS_X_HEIGHT_BLUE( bs ) )
         blue->flags |= AF_LATIN_BLUE_ADJUSTMENT;
 
       FT_TRACE5(( "    -> reference = %ld\n"
--- a/src/autofit/aflatin.h
+++ b/src/autofit/aflatin.h
@@ -63,8 +63,8 @@
 
 #define AF_LATIN_IS_TOP_BLUE( b ) \
           ( (b)->properties & AF_BLUE_PROPERTY_LATIN_TOP )
-#define AF_LATIN_IS_SMALL_TOP_BLUE( b ) \
-          ( (b)->properties & AF_BLUE_PROPERTY_LATIN_SMALL_TOP )
+#define AF_LATIN_IS_X_HEIGHT_BLUE( b ) \
+          ( (b)->properties & AF_BLUE_PROPERTY_LATIN_X_HEIGHT )
 #define AF_LATIN_IS_LONG_BLUE( b ) \
           ( (b)->properties & AF_BLUE_PROPERTY_LATIN_LONG )
 
--- a/src/autofit/aflatin2.c
+++ b/src/autofit/aflatin2.c
@@ -410,11 +410,11 @@
         blue->flags |= AF_LATIN_BLUE_TOP;
 
       /*
-       * The following flags is used later to adjust the y and x scales
+       * The following flag is used later to adjust the y and x scales
        * in order to optimize the pixel grid alignment of the top of small
        * letters.
        */
-      if ( bb == AF_LATIN_BLUE_SMALL_TOP )
+      if ( AF_LATIN_IS_X_HEIGHT_BLUE( bb ) )
         blue->flags |= AF_LATIN_BLUE_ADJUSTMENT;
 
       FT_TRACE5(( "    -> reference = %ld\n"