summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/include/freetype/ftlcdfil.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/include/freetype/ftlcdfil.h')
-rw-r--r--src/3rdparty/freetype/include/freetype/ftlcdfil.h59
1 files changed, 27 insertions, 32 deletions
diff --git a/src/3rdparty/freetype/include/freetype/ftlcdfil.h b/src/3rdparty/freetype/include/freetype/ftlcdfil.h
index 3a19d043bb..d3723e16f6 100644
--- a/src/3rdparty/freetype/include/freetype/ftlcdfil.h
+++ b/src/3rdparty/freetype/include/freetype/ftlcdfil.h
@@ -5,7 +5,7 @@
* FreeType API for color filtering of subpixel bitmap glyphs
* (specification).
*
- * Copyright (C) 2006-2019 by
+ * Copyright (C) 2006-2023 by
* David Turner, Robert Wilhelm, and Werner Lemberg.
*
* This file is part of the FreeType project, and may only be used,
@@ -20,9 +20,8 @@
#ifndef FTLCDFIL_H_
#define FTLCDFIL_H_
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#include FT_PARAMETER_TAGS_H
+#include <freetype/freetype.h>
+#include <freetype/ftparams.h>
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
@@ -45,9 +44,9 @@ FT_BEGIN_HEADER
* API to control subpixel rendering.
*
* @description:
- * FreeType provides two alternative subpixel rendering technologies.
+ * FreeType provides two alternative subpixel rendering technologies.
* Should you define `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` in your
- * `ftoption.h` file, this enables patented ClearType-style rendering.
+ * `ftoption.h` file, this enables ClearType-style rendering.
* Otherwise, Harmony LCD rendering is enabled. These technologies are
* controlled differently and API described below, although always
* available, performs its function when appropriate method is enabled
@@ -56,13 +55,12 @@ FT_BEGIN_HEADER
* ClearType-style LCD rendering exploits the color-striped structure of
* LCD pixels, increasing the available resolution in the direction of
* the stripe (usually horizontal RGB) by a factor of~3. Using the
- * subpixels coverages unfiltered can create severe color fringes
+ * subpixel coverages unfiltered can create severe color fringes
* especially when rendering thin features. Indeed, to produce
* black-on-white text, the nearby color subpixels must be dimmed
- * equally.
- *
- * A good 5-tap FIR filter should be applied to subpixel coverages
- * regardless of pixel boundaries and should have these properties:
+ * evenly. Therefore, an equalizing 5-tap FIR filter should be applied
+ * to subpixel coverages regardless of pixel boundaries and should have
+ * these properties:
*
* 1. It should be symmetrical, like {~a, b, c, b, a~}, to avoid
* any shifts in appearance.
@@ -85,7 +83,7 @@ FT_BEGIN_HEADER
* Harmony LCD rendering is suitable to panels with any regular subpixel
* structure, not just monitors with 3 color striped subpixels, as long
* as the color subpixels have fixed positions relative to the pixel
- * center. In this case, each color channel is then rendered separately
+ * center. In this case, each color channel can be rendered separately
* after shifting the outline opposite to the subpixel shift so that the
* coverage maps are aligned. This method is immune to color fringes
* because the shifts do not change integral coverage.
@@ -102,9 +100,9 @@ FT_BEGIN_HEADER
* clockwise. Harmony with default LCD geometry is equivalent to
* ClearType with light filter.
*
- * As a result of ClearType filtering or Harmony rendering, the
- * dimensions of LCD bitmaps can be either wider or taller than the
- * dimensions of the corresponding outline with regard to the pixel grid.
+ * As a result of ClearType filtering or Harmony shifts, the resulting
+ * dimensions of LCD bitmaps can be slightly wider or taller than the
+ * dimensions the original outline with regard to the pixel grid.
* For example, for @FT_RENDER_MODE_LCD, the filter adds 2~subpixels to
* the left, and 2~subpixels to the right. The bitmap offset values are
* adjusted accordingly, so clients shouldn't need to modify their layout
@@ -139,11 +137,11 @@ FT_BEGIN_HEADER
*
* FT_LCD_FILTER_DEFAULT ::
* This is a beveled, normalized, and color-balanced five-tap filter
- * with weights of [0x08 0x4D 0x56 0x4D 0x08] in 1/256th units.
+ * with weights of [0x08 0x4D 0x56 0x4D 0x08] in 1/256 units.
*
* FT_LCD_FILTER_LIGHT ::
* this is a boxy, normalized, and color-balanced three-tap filter with
- * weights of [0x00 0x55 0x56 0x55 0x00] in 1/256th units.
+ * weights of [0x00 0x55 0x56 0x55 0x00] in 1/256 units.
*
* FT_LCD_FILTER_LEGACY ::
* FT_LCD_FILTER_LEGACY1 ::
@@ -177,7 +175,7 @@ FT_BEGIN_HEADER
* FT_Library_SetLcdFilter
*
* @description:
- * This function is used to apply color filtering to LCD decimated
+ * This function is used to change filter applied to LCD decimated
* bitmaps, like the ones used when calling @FT_Render_Glyph with
* @FT_RENDER_MODE_LCD or @FT_RENDER_MODE_LCD_V.
*
@@ -196,15 +194,14 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success.
*
* @note:
- * This feature is always disabled by default. Clients must make an
- * explicit call to this function with a `filter` value other than
- * @FT_LCD_FILTER_NONE in order to enable it.
+ * Since 2.10.3 the LCD filtering is enabled with @FT_LCD_FILTER_DEFAULT.
+ * It is no longer necessary to call this function explicitly except
+ * to choose a different filter or disable filtering altogether with
+ * @FT_LCD_FILTER_NONE.
*
- * Due to **PATENTS** covering subpixel rendering, this function doesn't
- * do anything except returning `FT_Err_Unimplemented_Feature` if the
- * configuration macro `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is not
- * defined in your build of the library, which should correspond to all
- * default builds of FreeType.
+ * This function does nothing but returns `FT_Err_Unimplemented_Feature`
+ * if the configuration macro `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is
+ * not defined in your build of the library.
*
* @since:
* 2.3.0
@@ -229,17 +226,15 @@ FT_BEGIN_HEADER
*
* weights ::
* A pointer to an array; the function copies the first five bytes and
- * uses them to specify the filter weights in 1/256th units.
+ * uses them to specify the filter weights in 1/256 units.
*
* @return:
* FreeType error code. 0~means success.
*
* @note:
- * Due to **PATENTS** covering subpixel rendering, this function doesn't
- * do anything except returning `FT_Err_Unimplemented_Feature` if the
- * configuration macro `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is not
- * defined in your build of the library, which should correspond to all
- * default builds of FreeType.
+ * This function does nothing but returns `FT_Err_Unimplemented_Feature`
+ * if the configuration macro `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` is
+ * not defined in your build of the library.
*
* LCD filter weights can also be set per face using @FT_Face_Properties
* with @FT_PARAM_TAG_LCD_FILTER_WEIGHTS.