freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] Harmony e47feb0: [autofit] LCD equals LIGHT, LCD_V equals NO


From: Alexei Podtelezhnikov
Subject: [freetype2] Harmony e47feb0: [autofit] LCD equals LIGHT, LCD_V equals NORMAL.
Date: Thu, 30 Mar 2017 22:50:25 -0400 (EDT)

branch: Harmony
commit e47feb03cca26b4c8c683f43821438001471597d
Author: Alexei Podtelezhnikov <address@hidden>
Commit: Alexei Podtelezhnikov <address@hidden>

    [autofit] LCD equals LIGHT, LCD_V equals NORMAL.
    
    * include/freetype/freetype.h (FT_LOAD_TARGET_XXX): Docs updated.
    * src/autofit/afcjk.c (af_cjk_hints_init): Updated.
    * src/autofit/aflatin.c (af_latin_hints_init): Updated.
    * src/autofit/aflatin2.c (af_latin2_hints_init): Updated.
---
 ChangeLog                   |  9 +++++++++
 include/freetype/freetype.h |  2 +-
 src/autofit/afcjk.c         | 17 ++++++++---------
 src/autofit/aflatin.c       | 17 ++++++++---------
 src/autofit/aflatin2.c      | 20 +++++++++++---------
 5 files changed, 37 insertions(+), 28 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4077856..494684c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2017-03-30  Alexei Podtelezhnikov  <address@hidden>
+
+       [autofit] LCD equals LIGHT, LCD_V equals NORMAL.
+
+       * include/freetype/freetype.h (FT_LOAD_TARGET_XXX): Docs updated.
+       * src/autofit/afcjk.c (af_cjk_hints_init): Updated.
+       * src/autofit/aflatin.c (af_latin_hints_init): Updated.
+       * src/autofit/aflatin2.c (af_latin2_hints_init): Updated.
+
 2017-03-12  Alexei Podtelezhnikov  <address@hidden>
 
        [smooth] Dubious fix for Firefox.
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 71f0e24..8a291f6 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -2940,7 +2940,7 @@ FT_BEGIN_HEADER
    *     in non-monochrome modes.
    *
    *   FT_LOAD_TARGET_LCD ::
-   *     A variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally
+   *     A variant of @FT_LOAD_TARGET_LIGHT optimized for horizontally
    *     decimated LCD displays.
    *
    *   FT_LOAD_TARGET_LCD_V ::
diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c
index f172a9f..5c5dadd 100644
--- a/src/autofit/afcjk.c
+++ b/src/autofit/afcjk.c
@@ -1375,26 +1375,25 @@
     /* compute flags depending on render mode, etc. */
     mode = metrics->root.scaler.render_mode;
 
-#if 0 /* AF_CONFIG_OPTION_USE_WARPER */
-    if ( mode == FT_RENDER_MODE_LCD || mode == FT_RENDER_MODE_LCD_V )
+    if ( mode == FT_RENDER_MODE_LCD )
+      metrics->root.scaler.render_mode = mode = FT_RENDER_MODE_LIGHT;
+
+    if ( mode == FT_RENDER_MODE_LCD_V )
       metrics->root.scaler.render_mode = mode = FT_RENDER_MODE_NORMAL;
-#endif
 
     scaler_flags = hints->scaler_flags;
     other_flags  = 0;
 
     /*
-     *  We snap the width of vertical stems for the monochrome and
-     *  horizontal LCD rendering targets only.
+     *  We snap the width of vertical stems for the monochrome target only.
      */
-    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )
+    if ( mode == FT_RENDER_MODE_MONO )
       other_flags |= AF_LATIN_HINTS_HORZ_SNAP;
 
     /*
-     *  We snap the width of horizontal stems for the monochrome and
-     *  vertical LCD rendering targets only.
+     *  We snap the width of horizontal stems for the monochrome target only.
      */
-    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )
+    if ( mode == FT_RENDER_MODE_MONO )
       other_flags |= AF_LATIN_HINTS_VERT_SNAP;
 
     /*
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index b983460..5560979 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -2552,26 +2552,25 @@
     /* compute flags depending on render mode, etc. */
     mode = metrics->root.scaler.render_mode;
 
-#if 0 /* #ifdef AF_CONFIG_OPTION_USE_WARPER */
-    if ( mode == FT_RENDER_MODE_LCD || mode == FT_RENDER_MODE_LCD_V )
+    if ( mode == FT_RENDER_MODE_LCD )
+      metrics->root.scaler.render_mode = mode = FT_RENDER_MODE_LIGHT;
+
+    if ( mode == FT_RENDER_MODE_LCD_V )
       metrics->root.scaler.render_mode = mode = FT_RENDER_MODE_NORMAL;
-#endif
 
     scaler_flags = hints->scaler_flags;
     other_flags  = 0;
 
     /*
-     *  We snap the width of vertical stems for the monochrome and
-     *  horizontal LCD rendering targets only.
+     *  We snap the width of vertical stems for the monochrome target only.
      */
-    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )
+    if ( mode == FT_RENDER_MODE_MONO )
       other_flags |= AF_LATIN_HINTS_HORZ_SNAP;
 
     /*
-     *  We snap the width of horizontal stems for the monochrome and
-     *  vertical LCD rendering targets only.
+     *  We snap the width of horizontal stems for the monochrome target only.
      */
-    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )
+    if ( mode == FT_RENDER_MODE_MONO )
       other_flags |= AF_LATIN_HINTS_VERT_SNAP;
 
     /*
diff --git a/src/autofit/aflatin2.c b/src/autofit/aflatin2.c
index 7048756..d2addd5 100644
--- a/src/autofit/aflatin2.c
+++ b/src/autofit/aflatin2.c
@@ -1532,26 +1532,25 @@
     /* compute flags depending on render mode, etc. */
     mode = metrics->root.scaler.render_mode;
 
-#if 0 /* #ifdef AF_CONFIG_OPTION_USE_WARPER */
-    if ( mode == FT_RENDER_MODE_LCD || mode == FT_RENDER_MODE_LCD_V )
+    if ( mode == FT_RENDER_MODE_LCD )
+      metrics->root.scaler.render_mode = mode = FT_RENDER_MODE_LIGHT;
+
+    if ( mode == FT_RENDER_MODE_LCD_V )
       metrics->root.scaler.render_mode = mode = FT_RENDER_MODE_NORMAL;
-#endif
 
     scaler_flags = hints->scaler_flags;
     other_flags  = 0;
 
     /*
-     *  We snap the width of vertical stems for the monochrome and
-     *  horizontal LCD rendering targets only.
+     *  We snap the width of vertical stems for the monochrome target only.
      */
-    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )
+    if ( mode == FT_RENDER_MODE_MONO )
       other_flags |= AF_LATIN_HINTS_HORZ_SNAP;
 
     /*
-     *  We snap the width of horizontal stems for the monochrome and
-     *  vertical LCD rendering targets only.
+     *  We snap the width of horizontal stems for the monochrome target only.
      */
-    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )
+    if ( mode == FT_RENDER_MODE_MONO )
       other_flags |= AF_LATIN_HINTS_VERT_SNAP;
 
     /*
@@ -1566,6 +1565,9 @@
     /*
      *  In `light' hinting mode we disable horizontal hinting completely.
      *  We also do it if the face is italic.
+     *
+     *  However, if warping is enabled (which only works in `light' hinting
+     *  mode), advance widths get adjusted, too.
      */
     if ( mode == FT_RENDER_MODE_LIGHT                      ||
          ( face->style_flags & FT_STYLE_FLAG_ITALIC ) != 0 )



reply via email to

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