[FREETYPE] Update to v2.6.3. CORE-10964
[reactos.git] / reactos / lib / 3rdparty / freetype / include / freetype / ftlcdfil.h
index 653ed36..e06a895 100644 (file)
@@ -5,7 +5,7 @@
 /*    FreeType API for color filtering of subpixel bitmap glyphs           */
 /*    (specification).                                                     */
 /*                                                                         */
-/*  Copyright 2006-2015 by                                                 */
+/*  Copyright 2006-2016 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -17,8 +17,8 @@
 /***************************************************************************/
 
 
-#ifndef __FT_LCD_FILTER_H__
-#define __FT_LCD_FILTER_H__
+#ifndef FTLCDFIL_H_
+#define FTLCDFIL_H_
 
 #include <ft2build.h>
 #include FT_FREETYPE_H
@@ -57,7 +57,8 @@ FT_BEGIN_HEADER
    *   Note that no filter is active by default, and that this function is
    *   *not* implemented in default builds of the library.  You need to
    *   #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file
-   *   in order to activate it.
+   *   in order to activate it and explicitly call @FT_Library_SetLcdFilter
+   *   to enable it.
    *
    *   A filter should have two properties:
    *
@@ -102,6 +103,18 @@ FT_BEGIN_HEADER
    *   - [0x08 0x4D 0x56 0x4D 0x08] is beveled, normalized and, almost
    *     balanced.
    *
+   *   The filter affects glyph bitmaps rendered through @FT_Render_Glyph,
+   *   @FT_Load_Glyph, and @FT_Load_Char.  It does _not_ affect the output
+   *   of @FT_Outline_Render and @FT_Outline_Get_Bitmap.
+   *
+   *   If this feature is activated, the dimensions of LCD glyph bitmaps are
+   *   either wider or taller than the dimensions of the corresponding
+   *   outline with regard to the pixel grid.  For example, for
+   *   @FT_RENDER_MODE_LCD, the filter adds 3~subpixels to the left, and
+   *   3~subpixels to the right.  The bitmap offset values are adjusted
+   *   accordingly, so clients shouldn't need to modify their layout and
+   *   glyph positioning code when enabling the filter.
+   *
    *   It is important to understand that linear alpha blending and gamma
    *   correction is critical for correctly rendering glyphs onto surfaces
    *   without artifacts and even more critical when subpixel rendering is
@@ -137,7 +150,8 @@ FT_BEGIN_HEADER
    *     that is more forgiving to screens with non-ideal gamma curves and
    *     viewing angles.  Note that while color-fringing is reduced, it can
    *     only be minimized by using linear alpha blending and gamma
-   *     correction to render glyphs onto surfaces.
+   *     correction to render glyphs onto surfaces.  The default filter
+   *     weights are [0x08 0x4D 0x56 0x4D 0x08].
    *
    *   FT_LCD_FILTER_LIGHT ::
    *     The light filter is a variant that is sharper at the cost of
@@ -147,7 +161,8 @@ FT_BEGIN_HEADER
    *     is less forgiving to screens with non-ideal gamma curves and
    *     viewing angles.  This filter works best when the rendering system
    *     uses linear alpha blending and gamma correction to render glyphs
-   *     onto surfaces.
+   *     onto surfaces.  The light filter weights are
+   *     [0x00 0x55 0x56 0x55 0x00].
    *
    *   FT_LCD_FILTER_LEGACY ::
    *     This filter corresponds to the original libXft color filter.  It
@@ -218,22 +233,6 @@ FT_BEGIN_HEADER
    *   defined in your build of the library, which should correspond to all
    *   default builds of FreeType.
    *
-   *   The filter affects glyph bitmaps rendered through @FT_Render_Glyph,
-   *   @FT_Outline_Get_Bitmap, @FT_Load_Glyph, and @FT_Load_Char.
-   *
-   *   It does _not_ affect the output of @FT_Outline_Render and
-   *   @FT_Outline_Get_Bitmap.
-   *
-   *   If this feature is activated, the dimensions of LCD glyph bitmaps are
-   *   either larger or taller than the dimensions of the corresponding
-   *   outline with regards to the pixel grid.  For example, for
-   *   @FT_RENDER_MODE_LCD, the filter adds up to 3~pixels to the left, and
-   *   up to 3~pixels to the right.
-   *
-   *   The bitmap offset values are adjusted correctly, so clients shouldn't
-   *   need to modify their layout and glyph positioning code when enabling
-   *   the filter.
-   *
    * @since:
    *   2.3.0
    */
@@ -248,11 +247,8 @@ FT_BEGIN_HEADER
    *   FT_Library_SetLcdFilterWeights
    *
    * @description:
-   *   Use this function to override the filter weights selected by
-   *   @FT_Library_SetLcdFilter.  By default, FreeType uses the quintuple
-   *   (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x10,
-   *   0x40, 0x70, 0x40, 0x10) for FT_LCD_FILTER_DEFAULT and
-   *   FT_LCD_FILTER_LEGACY.
+   *   This function can be used to enable LCD filter with custom weights,
+   *   instead of using presets in @FT_Library_SetLcdFilter.
    *
    * @input:
    *   library ::
@@ -272,9 +268,6 @@ FT_BEGIN_HEADER
    *   defined in your build of the library, which should correspond to all
    *   default builds of FreeType.
    *
-   *   This function must be called after @FT_Library_SetLcdFilter to have
-   *   any effect.
-   *
    * @since:
    *   2.4.0
    */
@@ -287,7 +280,7 @@ FT_BEGIN_HEADER
 
 FT_END_HEADER
 
-#endif /* __FT_LCD_FILTER_H__ */
+#endif /* FTLCDFIL_H_ */
 
 
 /* END */