freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master 5710ef9 1/2: * src/smooth/ftsmooth.c (ft_smooth_rende


From: Alexei Podtelezhnikov
Subject: [freetype2] master 5710ef9 1/2: * src/smooth/ftsmooth.c (ft_smooth_render_generic): Clean up.
Date: Tue, 8 Aug 2017 23:07:28 -0400 (EDT)

branch: master
commit 5710ef989da2be3db21d875ac48eb980564c052b
Author: Alexei Podtelezhnikov <address@hidden>
Commit: Alexei Podtelezhnikov <address@hidden>

    * src/smooth/ftsmooth.c (ft_smooth_render_generic): Clean up.
---
 ChangeLog             |  4 ++++
 src/smooth/ftsmooth.c | 18 +++++-------------
 2 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9e4e4c2..d40137f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2017-08-08  Alexei Podtelezhnikov  <address@hidden>
 
+       * src/smooth/ftsmooth.c (ft_smooth_render_generic): Clean up.
+
+2017-08-08  Alexei Podtelezhnikov  <address@hidden>
+
        * src/sftnt/ttpost.c (format): Use otspec-compliant versions. 
 
 2017-06-27  Werner Lemberg  <address@hidden>
diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c
index fd12e66..11a739a 100644
--- a/src/smooth/ftsmooth.c
+++ b/src/smooth/ftsmooth.c
@@ -106,9 +106,6 @@
     FT_Pos       y_shift = 0;
     FT_Pos       x_left, y_top;
     FT_Pos       width, height, pitch;
-#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
-    FT_Pos       height_org, width_org;
-#endif
     FT_Int       hmul    = ( mode == FT_RENDER_MODE_LCD );
     FT_Int       vmul    = ( mode == FT_RENDER_MODE_LCD_V );
 
@@ -195,7 +192,7 @@
 
 #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
     /* add minimal padding for LCD filter depending on specific weights */
-    if ( lcd_filter_func)
+    if ( lcd_filter_func )
     {
       if ( hmul )
       {
@@ -229,11 +226,6 @@
     width  = (FT_ULong)( cbox.xMax - cbox.xMin ) >> 6;
     height = (FT_ULong)( cbox.yMax - cbox.yMin ) >> 6;
 
-#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
-    width_org  = width;
-    height_org = height;
-#endif
-
     pitch = width;
     if ( hmul )
     {
@@ -359,13 +351,13 @@
       FT_UInt   hh;
 
 
-      for ( hh = height_org; hh > 0; hh--, line += pitch )
+      for ( hh = height; hh > 0; hh--, line += pitch )
       {
         FT_UInt   xx;
         FT_Byte*  end = line + width;
 
 
-        for ( xx = width_org; xx > 0; xx-- )
+        for ( xx = width / 3; xx > 0; xx-- )
         {
           FT_UInt  pixel = line[xx-1];
 
@@ -381,12 +373,12 @@
     /* expand it vertically */
     if ( vmul )
     {
-      FT_Byte*  read  = bitmap->buffer + ( height - height_org ) * pitch;
+      FT_Byte*  read  = bitmap->buffer + ( height - height / 3 ) * pitch;
       FT_Byte*  write = bitmap->buffer;
       FT_UInt   hh;
 
 
-      for ( hh = height_org; hh > 0; hh-- )
+      for ( hh = height / 3; hh > 0; hh-- )
       {
         ft_memcpy( write, read, pitch );
         write += pitch;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]