misc/libfreetype/include/freetype/ftlcdfil.h
author unc0rr
Mon, 04 Feb 2013 00:13:55 +0400
changeset 8479 8d71109b04d2
parent 5172 88f2e05288ba
permissions -rw-r--r--
Some work on loading replay and interaction with checker
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     1
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     2
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     3
/*  ftlcdfil.h                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     4
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     5
/*    FreeType API for color filtering of subpixel bitmap glyphs           */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
/*    (specification).                                                     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
/*  Copyright 2006, 2007, 2008, 2010 by                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    11
/*  This file is part of the FreeType project, and may only be used,       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    12
/*  modified, and distributed under the terms of the FreeType project      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    13
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
/*  this file you indicate that you have read the license and              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
/*  understand and accept it fully.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    16
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    17
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    18
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    19
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
#ifndef __FT_LCD_FILTER_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
#define __FT_LCD_FILTER_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
#include <ft2build.h>
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
#include FT_FREETYPE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
#ifdef FREETYPE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
#error "freetype.h of FreeType 1 has been loaded!"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
#error "Please fix the directory search order for header files"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
#error "so that freetype.h of FreeType 2 is found first."
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
FT_BEGIN_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
  /***************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
   * @section:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
   *   lcd_filtering
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
   * @title:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
   *   LCD Filtering
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
   * @abstract:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
   *   Reduce color fringes of LCD-optimized bitmaps.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
   *   The @FT_Library_SetLcdFilter API can be used to specify a low-pass
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
   *   filter which is then applied to LCD-optimized bitmaps generated
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    49
   *   through @FT_Render_Glyph.  This is useful to reduce color fringes
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    50
   *   which would occur with unfiltered rendering.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
   *   Note that no filter is active by default, and that this function is
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
   *   *not* implemented in default builds of the library.  You need to
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
   *   #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
   *   in order to activate it.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
  /****************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
   * @enum:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
   *   FT_LcdFilter
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
   *   A list of values to identify various types of LCD filters.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
   * @values:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
   *   FT_LCD_FILTER_NONE ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
   *     Do not perform filtering.  When used with subpixel rendering, this
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
   *     results in sometimes severe color fringes.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
   *   FT_LCD_FILTER_DEFAULT ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
   *     The default filter reduces color fringes considerably, at the cost
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
   *     of a slight blurriness in the output.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
   *   FT_LCD_FILTER_LIGHT ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
   *     The light filter is a variant that produces less blurriness at the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
   *     cost of slightly more color fringes than the default one.  It might
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
   *     be better, depending on taste, your monitor, or your personal vision.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
   *   FT_LCD_FILTER_LEGACY ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
   *     This filter corresponds to the original libXft color filter.  It
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
   *     provides high contrast output but can exhibit really bad color
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
   *     fringes if glyphs are not extremely well hinted to the pixel grid.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
   *     In other words, it only works well if the TrueType bytecode
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
   *     interpreter is enabled *and* high-quality hinted fonts are used.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
   *     This filter is only provided for comparison purposes, and might be
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
   *     disabled or stay unsupported in the future.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
   * @since:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
   *   2.3.0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
  typedef enum  FT_LcdFilter_
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
  {
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
    FT_LCD_FILTER_NONE    = 0,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
    FT_LCD_FILTER_DEFAULT = 1,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
    FT_LCD_FILTER_LIGHT   = 2,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
    FT_LCD_FILTER_LEGACY  = 16,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
    FT_LCD_FILTER_MAX   /* do not remove */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
  } FT_LcdFilter;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
  /**************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
   * @func:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
   *   FT_Library_SetLcdFilter
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
   *   This function is used to apply color filtering to LCD decimated
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
   *   bitmaps, like the ones used when calling @FT_Render_Glyph with
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
   *   @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
   *   library ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
   *     A handle to the target library instance.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
   *   filter ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
   *     The filter type.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
   *     You can use @FT_LCD_FILTER_NONE here to disable this feature, or
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
   *     @FT_LCD_FILTER_DEFAULT to use a default filter that should work
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
   *     well on most LCD screens.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
   * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
   *   FreeType error code.  0~means success.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
   * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
   *   This feature is always disabled by default.  Clients must make an
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
   *   explicit call to this function with a `filter' value other than
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
   *   @FT_LCD_FILTER_NONE in order to enable it.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
   *   Due to *PATENTS* covering subpixel rendering, this function doesn't
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
   *   do anything except returning `FT_Err_Unimplemented_Feature' if the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
   *   configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
   *   defined in your build of the library, which should correspond to all
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
   *   default builds of FreeType.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
   *   The filter affects glyph bitmaps rendered through @FT_Render_Glyph,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
   *   @FT_Outline_Get_Bitmap, @FT_Load_Glyph, and @FT_Load_Char.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
   *   It does _not_ affect the output of @FT_Outline_Render and
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
   *   @FT_Outline_Get_Bitmap.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
   *   If this feature is activated, the dimensions of LCD glyph bitmaps are
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
   *   either larger or taller than the dimensions of the corresponding
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
   *   outline with regards to the pixel grid.  For example, for
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
   *   @FT_RENDER_MODE_LCD, the filter adds up to 3~pixels to the left, and
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
   *   up to 3~pixels to the right.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
   *   The bitmap offset values are adjusted correctly, so clients shouldn't
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
   *   need to modify their layout and glyph positioning code when enabling
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
   *   the filter.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
   * @since:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
   *   2.3.0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
  FT_Library_SetLcdFilter( FT_Library    library,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
                           FT_LcdFilter  filter );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
  /**************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
   * @func:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
   *   FT_Library_SetLcdFilterWeights
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
   *   Use this function to override the filter weights selected by
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
   *   @FT_Library_SetLcdFilter.  By default, FreeType uses the quintuple
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
   *   (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x10,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   174
   *   0x40, 0x70, 0x40, 0x10) for FT_LCD_FILTER_DEFAULT and
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
   *   FT_LCD_FILTER_LEGACY.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
   *   library ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
   *     A handle to the target library instance.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
   *   weights ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
   *     A pointer to an array; the function copies the first five bytes and
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   183
   *     uses them to specify the filter weights.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   184
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
   * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
   *   FreeType error code.  0~means success.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
   * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
   *   Due to *PATENTS* covering subpixel rendering, this function doesn't
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
   *   do anything except returning `FT_Err_Unimplemented_Feature' if the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
   *   configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
   *   defined in your build of the library, which should correspond to all
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
   *   default builds of FreeType.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   194
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   195
   *   This function must be called after @FT_Library_SetLcdFilter to have
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
   *   any effect.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
   * @since:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
   *   2.4.0
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
  FT_EXPORT( FT_Error )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
  FT_Library_SetLcdFilterWeights( FT_Library      library,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
                                  unsigned char  *weights );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
FT_END_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
#endif /* __FT_LCD_FILTER_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   213
/* END */