089685
--- a/src/smooth/ftsmooth.c
089685
+++ b/src/smooth/ftsmooth.c
089685
@@ -232,39 +232,13 @@
089685
       FT_UInt   i, j;
089685
 
089685
       unsigned int  height = bitmap->rows;
089685
-      unsigned int  width  = bitmap->width;
089685
+      unsigned int  width  = bitmap->width / 3;
089685
       int           pitch  = bitmap->pitch;
089685
 
089685
-
089685
-      /* Render 3 separate monochrome bitmaps, shifting the outline  */
089685
-      /* by 1/3 pixel.                                               */
089685
-      width /= 3;
089685
-
089685
-      bitmap->buffer += width;
089685
-
089685
-      error = render->raster_render( render->raster, &params );
089685
-      if ( error )
089685
-        goto Exit;
089685
-
089685
-      FT_Outline_Translate( outline, -21, 0 );
089685
-      x_shift        -= 21;
089685
-      bitmap->buffer += width;
089685
-
089685
       error = render->raster_render( render->raster, &params );
089685
       if ( error )
089685
         goto Exit;
089685
 
089685
-      FT_Outline_Translate( outline,  42, 0 );
089685
-      x_shift        += 42;
089685
-      bitmap->buffer -= 2 * width;
089685
-
089685
-      error = render->raster_render( render->raster, &params );
089685
-      if ( error )
089685
-        goto Exit;
089685
-
089685
-      /* XXX: Rearrange the bytes according to FT_PIXEL_MODE_LCD.    */
089685
-      /* XXX: It is more efficient to render every third byte above. */
089685
-
089685
       if ( FT_ALLOC( temp, (FT_ULong)pitch ) )
089685
         goto Exit;
089685
 
089685
@@ -272,11 +246,7 @@
089685
       {
089685
         line = bitmap->buffer + i * (FT_ULong)pitch;
089685
         for ( j = 0; j < width; j++ )
089685
-        {
089685
-          temp[3 * j    ] = line[j];
089685
-          temp[3 * j + 1] = line[j + width];
089685
-          temp[3 * j + 2] = line[j + width + width];
089685
-        }
089685
+          temp[3 * j] = temp[3 * j + 1] = temp[3 * j + 2] = line[j];
089685
         FT_MEM_COPY( line, temp, pitch );
089685
       }
089685
 
089685
@@ -284,35 +254,23 @@
089685
     }
089685
     else if ( vmul )  /* lcd_v */
089685
     {
089685
-      int  pitch  = bitmap->pitch;
089685
-
089685
+      FT_Byte*  line;
089685
+      FT_UInt   i;
089685
+      int       original_pitch  = bitmap->pitch;
089685
 
089685
-      /* Render 3 separate monochrome bitmaps, shifting the outline  */
089685
-      /* by 1/3 pixel. Triple the pitch to render on each third row. */
089685
       bitmap->pitch *= 3;
089685
       bitmap->rows  /= 3;
089685
 
089685
-      bitmap->buffer += pitch;
089685
-
089685
-      error = render->raster_render( render->raster, &params );
089685
-      if ( error )
089685
-        goto Exit;
089685
-
089685
-      FT_Outline_Translate( outline, 0,  21 );
089685
-      y_shift        += 21;
089685
-      bitmap->buffer += pitch;
089685
-
089685
       error = render->raster_render( render->raster, &params );
089685
       if ( error )
089685
         goto Exit;
089685
 
089685
-      FT_Outline_Translate( outline, 0, -42 );
089685
-      y_shift        -= 42;
089685
-      bitmap->buffer -= 2 * pitch;
089685
-
089685
-      error = render->raster_render( render->raster, &params );
089685
-      if ( error )
089685
-        goto Exit;
089685
+      for ( i = 0; i < bitmap->rows; i++ )
089685
+      {
089685
+        line = bitmap->buffer + i * bitmap->pitch;
089685
+        FT_MEM_COPY( line + original_pitch, line, bitmap->width );
089685
+        FT_MEM_COPY( line + 2 * original_pitch, line, bitmap->width );
089685
+      }
089685
 
089685
       bitmap->pitch /= 3;
089685
       bitmap->rows  *= 3;