shithub: freetype+ttf2subf

Download patch

ref: d6061212c3bcef9082253a7ed40128fac5214c0f
parent: 8d05486eab0035cf62bb0b85353b84c6b3b9fbba
author: Werner Lemberg <[email protected]>
date: Wed Nov 19 16:13:23 EST 2014

Minor code improvement in `FT_Bitmap_Embolden'.

* src/base/ftbitmap.c (FT_Bitmap_Embolden) <FT_PIXEL_MODE_GRAY[24]>:
Fix thinko.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-11-19  Werner Lemberg  <[email protected]>
+
+	Minor code improvement in `FT_Bitmap_Embolden'.
+
+	* src/base/ftbitmap.c (FT_Bitmap_Embolden) <FT_PIXEL_MODE_GRAY[24]>:
+	Fix thinko.
+
 2014-11-19  Alexei Podtelezhnikov  <[email protected]>
 
 	* src/base/fttrigon.c: Use dedicated `FT_Angle' for arctan table.
--- a/src/base/ftbitmap.c
+++ b/src/base/ftbitmap.c
@@ -254,17 +254,11 @@
     case FT_PIXEL_MODE_GRAY4:
       {
         FT_Bitmap  tmp;
-        FT_Int     align;
 
 
-        if ( bitmap->pixel_mode == FT_PIXEL_MODE_GRAY2 )
-          align = ( bitmap->width + xstr + 3 ) / 4;
-        else
-          align = ( bitmap->width + xstr + 1 ) / 2;
-
+        /* convert to 8bpp */
         FT_Bitmap_New( &tmp );
-
-        error = FT_Bitmap_Convert( library, bitmap, &tmp, align );
+        error = FT_Bitmap_Convert( library, bitmap, &tmp, 1 );
         if ( error )
           return error;