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