shithub: freetype+ttf2subf

Download patch

ref: 1c044d7d29405644d29ae7fa105342365c517699
parent: 562731d487813c55046eb8d9f03e3ff7be25c3b5
author: David Turner <[email protected]>
date: Sat Mar 15 08:29:49 EST 2003

* src/truetyoe/ttdriver.c (Set_Char_Sizes): fixed a small rounding bug.
    Actually, it seems that previous versions of FreeType didn't perform
    TrueType rounding exactly as appropriate.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-03-15  David Turner  <[email protected]>
+
+    * src/truetyoe/ttdriver.c (Set_Char_Sizes): fixed a small rounding bug.
+    Actually, it seems that previous versions of FreeType didn't perform
+    TrueType rounding exactly as appropriate.
+
 2003-03-14  David Turner  <[email protected]>
 
     * src/truetype/ttdriver.c: fixing the small TrueType native rendering
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -207,8 +207,8 @@
      /* we need to use rounding in the following computations. Otherwise,
       * the resulting hinted outlines will be very slightly distorted
       */
-      dim_x = ( ( ( char_width  * horz_resolution ) / 72 ) + 32 ) & -64;
-      dim_y = ( ( ( char_height * vert_resolution ) / 72 ) + 32 ) & -64;
+      dim_x = ( ( char_width  * horz_resolution + (36+32*72) ) / 72 ) & -64;
+      dim_y = ( ( char_height * vert_resolution + (36+32*72) ) / 72 ) & -64;
     }
     else
     {