freetype-commit
[Top][All Lists]
Advanced

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

[freetype2-demos] master 246c6b3: [ftview] Fix LCD rendering of color-la


From: Werner LEMBERG
Subject: [freetype2-demos] master 246c6b3: [ftview] Fix LCD rendering of color-layered glyphs.
Date: Sun, 24 Feb 2019 15:25:41 -0500 (EST)

branch: master
commit 246c6b3d9644db38ed211ce27c8acc9d12ecf2af
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    [ftview] Fix LCD rendering of color-layered glyphs.
    
    * src/ftview.c (Render_All): Always use normal rendering for
    color-layered glyphs.
---
 ChangeLog      |  7 +++++++
 src/ftcommon.c |  2 +-
 src/ftview.c   | 12 +++++++++---
 3 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 736a39e..795f710 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-02-24  Werner Lemberg  <address@hidden>
+
+       [ftview] Fix LCD rendering of color-layered glyphs.
+
+       * src/ftview.c (Render_All): Always use normal rendering for
+       color-layered glyphs.
+
 2019-02-23  Werner Lemberg  <address@hidden>
 
        [ftview] Add more control for color-layered glyphs.
diff --git a/src/ftcommon.c b/src/ftcommon.c
index 26a1e6e..8699add 100644
--- a/src/ftcommon.c
+++ b/src/ftcommon.c
@@ -721,7 +721,7 @@
         flags |= FT_LOAD_MONOCHROME;
     }
 
-    handle->load_flags    = flags;
+    handle->load_flags = flags;
   }
 
 
diff --git a/src/ftview.c b/src/ftview.c
index 9253113..b8e8a53 100644
--- a/src/ftview.c
+++ b/src/ftview.c
@@ -480,11 +480,16 @@
         FT_Vector  bitmap_offset = { 0, 0 };
 
 
-        /* we want to handle glyph layers manually, */
-        /* thus switching off `FT_LOAD_COLOR'       */
+        /*
+         * We want to handle glyph layers manually, thus switching off
+         * `FT_LOAD_COLOR' and ensuring normal AA render mode.
+         */
         load_flags &= ~FT_LOAD_COLOR;
         load_flags |=  FT_LOAD_RENDER;
 
+        load_flags &= ~FT_LOAD_TARGET_( 0xF );
+        load_flags |=  FT_LOAD_TARGET_NORMAL;
+
         FT_Bitmap_Init( &bitmap );
 
         do
@@ -538,7 +543,7 @@
 
       if ( X_TOO_LONG( x + width, display ) )
       {
-        x = start_x;
+        x  = start_x;
         y += step_y;
 
         if ( Y_TOO_LONG( y, display ) )
@@ -555,6 +560,7 @@
       }
 
       error = FTDemo_Draw_Slot( handle, display, slot, &x, &y );
+
       if ( error )
         goto Next;
 



reply via email to

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