freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master ed7f091 1/2: New header file `ftparams.h' that collec


From: Werner LEMBERG
Subject: [freetype2] master ed7f091 1/2: New header file `ftparams.h' that collects all parameter tags.
Date: Wed, 6 Dec 2017 17:18:09 -0500 (EST)

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

    New header file `ftparams.h' that collects all parameter tags.
    
    * include/freetype/config/ftheader.h (FT_PARAMETER_TAGS_H): New
    macro.
    (FT_TRUETYPE_UNPATENTED_H, FT_UNPATENTED_HINTING_H): Define it to
    `ftparams.h'.
    
    * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h,
    include/freetype/ftincrem.h, include/freetype/ftlcdfil.h,
    include/freetype/ftsnames.h, include/freetype/ftt1drv.h: Include
    FT_PARAMETER_TAGS_H.
    Move FT_PARAM_TAG_XXX definitions to...
    * include/freetype/ftparams.h: ...this new file.
    
    * include/freetype/ttunpat.h: Remove.  No longer needed.
---
 ChangeLog                          |  18 ++++
 include/freetype/config/ftheader.h |   5 +-
 include/freetype/freetype.h        |  15 +--
 include/freetype/ftautoh.h         |  25 +----
 include/freetype/ftcffdrv.h        |  20 +---
 include/freetype/ftchapters.h      |   1 +
 include/freetype/ftincrem.h        |  13 +--
 include/freetype/ftlcdfil.h        |  21 +---
 include/freetype/ftparams.h        | 206 +++++++++++++++++++++++++++++++++++++
 include/freetype/ftsnames.h        |  48 +--------
 include/freetype/ftt1drv.h         |  16 +--
 include/freetype/ttunpat.h         |  63 ------------
 12 files changed, 242 insertions(+), 209 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f1b6067..ef16ae1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2017-12-06  Werner Lemberg  <address@hidden>
+
+       New header file `ftparams.h' that collects all parameter tags.
+
+       * include/freetype/config/ftheader.h (FT_PARAMETER_TAGS_H): New
+       macro.
+       (FT_TRUETYPE_UNPATENTED_H, FT_UNPATENTED_HINTING_H): Define it to
+       `ftparams.h'.
+
+       * include/freetype/ftautoh.h, include/freetype/ftcffdrv.h,
+       include/freetype/ftincrem.h, include/freetype/ftlcdfil.h,
+       include/freetype/ftsnames.h, include/freetype/ftt1drv.h: Include
+       FT_PARAMETER_TAGS_H.
+       Move FT_PARAM_TAG_XXX definitions to...
+       * include/freetype/ftparams.h: ...this new file.
+
+       * include/freetype/ttunpat.h: Remove.  No longer needed.
+
 2017-12-05  Werner Lemberg  <address@hidden>
 
        Improve tracing messages by using singular and plural forms.
diff --git a/include/freetype/config/ftheader.h 
b/include/freetype/config/ftheader.h
index ce3b7ee..2c2258f 100644
--- a/include/freetype/config/ftheader.h
+++ b/include/freetype/config/ftheader.h
@@ -781,7 +781,7 @@
    * @description:
    *   Deprecated.
    */
-#define FT_UNPATENTED_HINTING_H  <freetype/ttunpat.h>
+#define FT_UNPATENTED_HINTING_H  <freetype/ftparams.h>
 
 
   /*************************************************************************
@@ -823,6 +823,7 @@
   /* */
 
 #define FT_ERROR_DEFINITIONS_H  <freetype/fterrdef.h>
+#define FT_PARAMETER_TAGS_H     <freetype/ftparams.h>
 
 
   /* The internals of the cache sub-system are no longer exposed.  We */
@@ -840,7 +841,7 @@
 
 #define FT_INCREMENTAL_H          <freetype/ftincrem.h>
 
-#define FT_TRUETYPE_UNPATENTED_H  <freetype/ttunpat.h>
+#define FT_TRUETYPE_UNPATENTED_H  <freetype/ftparams.h>
 
 
   /*
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 96a8dcc..fb46fbd 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -3795,17 +3795,18 @@ FT_BEGIN_HEADER
    *   Note that only a subset of the available properties can be
    *   controlled.
    *
-   *   * Stem darkening (@FT_PARAM_TAG_STEM_DARKENING, corresponding to the
-   *     property `no-stem-darkening' provided by the `autofit' and `cff'
-   *     modules; see @no-stem-darkening[autofit] and
+   *   * @FT_PARAM_TAG_STEM_DARKENING (stem darkening, corresponding to the
+   *     property `no-stem-darkening' provided by the `autofit', `cff',
+   *     `type1', and `t1cid' modules; see @no-stem-darkening[autofit] and
    *     @no-stem-darkening[cff]).
    *
-   *   * LCD filter weights (@FT_PARAM_TAG_LCD_FILTER_WEIGHTS, corresponding
+   *   * @FT_PARAM_TAG_LCD_FILTER_WEIGHTS (LCD filter weights, corresponding
    *     to function @FT_Library_SetLcdFilterWeights).
    *
-   *   * Seed value for the CFF `random' operator
-   *     (@FT_PARAM_TAG_RANDOM_SEED, corresponding to the `random-seed'
-   *     property provided by the `cff' module; see @random-seed).
+   *   * @FT_PARAM_TAG_RANDOM_SEED (seed value for the CFF, Type~1, and CID
+   *     `random' operator, corresponding to the `random-seed' property
+   *     provided by the `cff', `type1', and `t1cid' modules; see
+   *     @random-seed).
    *
    *   Pass NULL as `data' in @FT_Parameter for a given tag to reset the
    *   option and use the library or module default again.
diff --git a/include/freetype/ftautoh.h b/include/freetype/ftautoh.h
index 60fadea..878e458 100644
--- a/include/freetype/ftautoh.h
+++ b/include/freetype/ftautoh.h
@@ -21,6 +21,7 @@
 
 #include <ft2build.h>
 #include FT_FREETYPE_H
+#include FT_PARAMETER_TAGS_H
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
@@ -503,30 +504,6 @@ FT_BEGIN_HEADER
 
   /**************************************************************************
    *
-   * @constant:
-   *   FT_PARAM_TAG_STEM_DARKENING
-   *
-   * @description:
-   *   An @FT_Parameter tag to be used with @FT_Face_Properties.  The
-   *   corresponding Boolean argument specifies whether to apply stem
-   *   darkening, overriding the global default values or the values set up
-   *   with @FT_Property_Set (see @no-stem-darkening[autofit] and
-   *   @no-stem-darkening[cff]).
-   *
-   *   This is a passive setting that only takes effect if the font driver
-   *   or autohinter honors it, which the CFF driver always does, but the
-   *   autohinter only in `light' hinting mode (as of version 2.7.0).
-   *
-   * @since:
-   *   2.8
-   *
-   */
-#define FT_PARAM_TAG_STEM_DARKENING \
-          FT_MAKE_TAG( 'd', 'a', 'r', 'k' )
-
-
-  /**************************************************************************
-   *
    * @property:
    *   darkening-parameters[autofit]
    *
diff --git a/include/freetype/ftcffdrv.h b/include/freetype/ftcffdrv.h
index f1e9452..51acf4a 100644
--- a/include/freetype/ftcffdrv.h
+++ b/include/freetype/ftcffdrv.h
@@ -21,6 +21,7 @@
 
 #include <ft2build.h>
 #include FT_FREETYPE_H
+#include FT_PARAMETER_TAGS_H
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
@@ -309,25 +310,6 @@ FT_BEGIN_HEADER
    */
 
 
-  /**************************************************************************
-   *
-   * @constant:
-   *   FT_PARAM_TAG_RANDOM_SEED
-   *
-   * @description:
-   *   An @FT_Parameter tag to be used with @FT_Face_Properties.  The
-   *   corresponding 32bit signed integer argument overrides the CFF
-   *   module's random seed value with a face-specific one; see
-   *   @random-seed.
-   *
-   * @since:
-   *   2.8
-   *
-   */
-#define FT_PARAM_TAG_RANDOM_SEED \
-          FT_MAKE_TAG( 's', 'e', 'e', 'd' )
-
-
   /* */
 
 
diff --git a/include/freetype/ftchapters.h b/include/freetype/ftchapters.h
index a0a121b..75747cd 100644
--- a/include/freetype/ftchapters.h
+++ b/include/freetype/ftchapters.h
@@ -60,6 +60,7 @@
 /*    pfr_fonts                                                            */
 /*    winfnt_fonts                                                         */
 /*    font_formats                                                         */
+/*    parameter_tags                                                       */
 /*    gasp_table                                                           */
 /*                                                                         */
 /***************************************************************************/
diff --git a/include/freetype/ftincrem.h b/include/freetype/ftincrem.h
index f6ae2ba..0204b25 100644
--- a/include/freetype/ftincrem.h
+++ b/include/freetype/ftincrem.h
@@ -21,6 +21,7 @@
 
 #include <ft2build.h>
 #include FT_FREETYPE_H
+#include FT_PARAMETER_TAGS_H
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
@@ -331,18 +332,6 @@ FT_BEGIN_HEADER
   typedef FT_Incremental_InterfaceRec*   FT_Incremental_Interface;
 
 
-  /***************************************************************************
-   *
-   * @constant:
-   *   FT_PARAM_TAG_INCREMENTAL
-   *
-   * @description:
-   *   A constant used as the tag of @FT_Parameter structures to indicate
-   *   an incremental loading object to be used by FreeType.
-   *
-   */
-#define FT_PARAM_TAG_INCREMENTAL  FT_MAKE_TAG( 'i', 'n', 'c', 'r' )
-
   /* */
 
 
diff --git a/include/freetype/ftlcdfil.h b/include/freetype/ftlcdfil.h
index df1d7cc..37a9305 100644
--- a/include/freetype/ftlcdfil.h
+++ b/include/freetype/ftlcdfil.h
@@ -22,6 +22,7 @@
 
 #include <ft2build.h>
 #include FT_FREETYPE_H
+#include FT_PARAMETER_TAGS_H
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
@@ -280,26 +281,6 @@ FT_BEGIN_HEADER
                                   unsigned char  *weights );
 
 
-  /**************************************************************************
-   *
-   * @constant:
-   *   FT_PARAM_TAG_LCD_FILTER_WEIGHTS
-   *
-   * @description:
-   *   An @FT_Parameter tag to be used with @FT_Face_Properties.  The
-   *   corresponding argument specifies the five LCD filter weights for a
-   *   given face (if using @FT_LOAD_TARGET_LCD, for example), overriding
-   *   the global default values or the values set up with
-   *   @FT_Library_SetLcdFilterWeights.
-   *
-   * @since:
-   *   2.8
-   *
-   */
-#define FT_PARAM_TAG_LCD_FILTER_WEIGHTS \
-          FT_MAKE_TAG( 'l', 'c', 'd', 'f' )
-
-
   /*
    * @type:
    *   FT_LcdFiveTapFilter
diff --git a/include/freetype/ftparams.h b/include/freetype/ftparams.h
new file mode 100644
index 0000000..992b350
--- /dev/null
+++ b/include/freetype/ftparams.h
@@ -0,0 +1,206 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftparams.h                                                             */
+/*                                                                         */
+/*    FreeType API for possible FT_Parameter tags (specification only).    */
+/*                                                                         */
+/*  Copyright 2017 by                                                      */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef FTPARAMS_H_
+#define FTPARAMS_H_
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /**************************************************************************
+   *
+   * @section:
+   *   parameter_tags
+   *
+   * @title:
+   *   Parameter Tags
+   *
+   * @abstract:
+   *   Macros for driver property and font loading parameter tags.
+   *
+   * @description:
+   *   This section contains macros for the @FT_Parameter structure that are
+   *   used with various functions to activate some special functionality or
+   *   different behaviour of various components of FreeType.
+   *
+   */
+
+
+  /***************************************************************************
+   *
+   * @constant:
+   *   FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
+   *
+   * @description:
+   *   A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
+   *   family names in the `name' table (introduced in OpenType version
+   *   1.4).  Use this for backward compatibility with legacy systems that
+   *   have a four-faces-per-family restriction.
+   *
+   * @since:
+   *   2.8
+   *
+   */
+#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY \
+          FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
+
+
+  /* this constant is deprecated */
+#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \
+          FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
+
+
+  /***************************************************************************
+   *
+   * @constant:
+   *   FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
+   *
+   * @description:
+   *   A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
+   *   subfamily names in the `name' table (introduced in OpenType version
+   *   1.4).  Use this for backward compatibility with legacy systems that
+   *   have a four-faces-per-family restriction.
+   *
+   * @since:
+   *   2.8
+   *
+   */
+#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY \
+          FT_MAKE_TAG( 'i', 'g', 'p', 's' )
+
+
+  /* this constant is deprecated */
+#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \
+          FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
+
+
+  /***************************************************************************
+   *
+   * @constant:
+   *   FT_PARAM_TAG_INCREMENTAL
+   *
+   * @description:
+   *   An @FT_Parameter tag to be used with @FT_Open_Face to indicate
+   *   incremental glyph loading.
+   *
+   */
+#define FT_PARAM_TAG_INCREMENTAL \
+          FT_MAKE_TAG( 'i', 'n', 'c', 'r' )
+
+
+  /**************************************************************************
+   *
+   * @constant:
+   *   FT_PARAM_TAG_LCD_FILTER_WEIGHTS
+   *
+   * @description:
+   *   An @FT_Parameter tag to be used with @FT_Face_Properties.  The
+   *   corresponding argument specifies the five LCD filter weights for a
+   *   given face (if using @FT_LOAD_TARGET_LCD, for example), overriding
+   *   the global default values or the values set up with
+   *   @FT_Library_SetLcdFilterWeights.
+   *
+   * @since:
+   *   2.8
+   *
+   */
+#define FT_PARAM_TAG_LCD_FILTER_WEIGHTS \
+          FT_MAKE_TAG( 'l', 'c', 'd', 'f' )
+
+
+  /**************************************************************************
+   *
+   * @constant:
+   *   FT_PARAM_TAG_RANDOM_SEED
+   *
+   * @description:
+   *   An @FT_Parameter tag to be used with @FT_Face_Properties.  The
+   *   corresponding 32bit signed integer argument overrides the font
+   *   driver's random seed value with a face-specific one; see
+   *   @random-seed.
+   *
+   * @since:
+   *   2.8
+   *
+   */
+#define FT_PARAM_TAG_RANDOM_SEED \
+          FT_MAKE_TAG( 's', 'e', 'e', 'd' )
+
+
+  /**************************************************************************
+   *
+   * @constant:
+   *   FT_PARAM_TAG_STEM_DARKENING
+   *
+   * @description:
+   *   An @FT_Parameter tag to be used with @FT_Face_Properties.  The
+   *   corresponding Boolean argument specifies whether to apply stem
+   *   darkening, overriding the global default values or the values set up
+   *   with @FT_Property_Set (see @no-stem-darkening[autofit] and
+   *   @no-stem-darkening[cff]).
+   *
+   *   This is a passive setting that only takes effect if the font driver
+   *   or autohinter honors it, which the CFF, Type~1, and CID drivers
+   *   always do, but the autohinter only in `light' hinting mode (as of
+   *   version 2.8.2).
+   *
+   * @since:
+   *   2.8
+   *
+   */
+#define FT_PARAM_TAG_STEM_DARKENING \
+          FT_MAKE_TAG( 'd', 'a', 'r', 'k' )
+
+
+ /***************************************************************************
+  *
+  * @constant:
+  *   FT_PARAM_TAG_UNPATENTED_HINTING
+  *
+  * @description:
+  *   Deprecated, no effect.
+  *
+  *   Previously: A constant used as the tag of an @FT_Parameter structure to
+  *   indicate that unpatented methods only should be used by the TrueType
+  *   bytecode interpreter for a typeface opened by @FT_Open_Face.
+  *
+  */
+#define FT_PARAM_TAG_UNPATENTED_HINTING \
+          FT_MAKE_TAG( 'u', 'n', 'p', 'a' )
+
+
+  /* */
+
+
+FT_END_HEADER
+
+
+#endif /* FTPARAMS_H_ */
+
+
+/* END */
diff --git a/include/freetype/ftsnames.h b/include/freetype/ftsnames.h
index d524ad7..fc1d5a9 100644
--- a/include/freetype/ftsnames.h
+++ b/include/freetype/ftsnames.h
@@ -25,6 +25,7 @@
 
 #include <ft2build.h>
 #include FT_FREETYPE_H
+#include FT_PARAMETER_TAGS_H
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
@@ -241,53 +242,6 @@ FT_BEGIN_HEADER
                        FT_SfntLangTag  *alangTag );
 
 
-  /***************************************************************************
-   *
-   * @constant:
-   *   FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
-   *
-   * @description:
-   *   A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
-   *   family names in the `name' table (introduced in OpenType version
-   *   1.4).  Use this for backward compatibility with legacy systems that
-   *   have a four-faces-per-family restriction.
-   *
-   * @since:
-   *   2.8
-   *
-   */
-#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY \
-          FT_MAKE_TAG( 'i', 'g', 'p', 'f' )
-
-
-  /* this constant is deprecated */
-#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \
-          FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY
-
-
-  /***************************************************************************
-   *
-   * @constant:
-   *   FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
-   *
-   * @description:
-   *   A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
-   *   subfamily names in the `name' table (introduced in OpenType version
-   *   1.4).  Use this for backward compatibility with legacy systems that
-   *   have a four-faces-per-family restriction.
-   *
-   * @since:
-   *   2.8
-   *
-   */
-#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY \
-          FT_MAKE_TAG( 'i', 'g', 'p', 's' )
-
-
-  /* this constant is deprecated */
-#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \
-          FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY
-
   /* */
 
 
diff --git a/include/freetype/ftt1drv.h b/include/freetype/ftt1drv.h
index e082f6b..a8e6b08 100644
--- a/include/freetype/ftt1drv.h
+++ b/include/freetype/ftt1drv.h
@@ -21,6 +21,7 @@
 
 #include <ft2build.h>
 #include FT_FREETYPE_H
+#include FT_PARAMETER_TAGS_H
 
 #ifdef FREETYPE_H
 #error "freetype.h of FreeType 1 has been loaded!"
@@ -96,21 +97,6 @@ FT_BEGIN_HEADER
 #define FT_T1_HINTING_ADOBE     1
 
 
-  /**************************************************************************
-   *
-   * @constant:
-   *   FT_PARAM_TAG_RANDOM_SEED
-   *
-   * @description:
-   *   An @FT_Parameter tag to be used with @FT_Face_Properties.  The
-   *   corresponding 32bit signed integer argument overrides the CFF
-   *   module's random seed value with a face-specific one; see
-   *   @random-seed.
-   *
-   */
-#define FT_PARAM_TAG_RANDOM_SEED \
-          FT_MAKE_TAG( 's', 'e', 'e', 'd' )
-
   /* */
 
 
diff --git a/include/freetype/ttunpat.h b/include/freetype/ttunpat.h
deleted file mode 100644
index f5e4170..0000000
--- a/include/freetype/ttunpat.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/***************************************************************************/
-/*                                                                         */
-/*  ttunpat.h                                                              */
-/*                                                                         */
-/*    Definitions for the unpatented TrueType hinting system.              */
-/*    Obsolete, retained for backward compatibility.                       */
-/*                                                                         */
-/*  Copyright 2003-2017 by                                                 */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  Written by Graham Asher <address@hidden>                  */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef TTUNPAT_H_
-#define TTUNPAT_H_
-
-
-#include <ft2build.h>
-#include FT_FREETYPE_H
-
-#ifdef FREETYPE_H
-#error "freetype.h of FreeType 1 has been loaded!"
-#error "Please fix the directory search order for header files"
-#error "so that freetype.h of FreeType 2 is found first."
-#endif
-
-
-FT_BEGIN_HEADER
-
-
- /***************************************************************************
-  *
-  * @constant:
-  *   FT_PARAM_TAG_UNPATENTED_HINTING
-  *
-  * @description:
-  *   Deprecated.
-  *
-  *   Previously: A constant used as the tag of an @FT_Parameter structure to
-  *   indicate that unpatented methods only should be used by the TrueType
-  *   bytecode interpreter for a typeface opened by @FT_Open_Face.
-  *
-  */
-#define FT_PARAM_TAG_UNPATENTED_HINTING  FT_MAKE_TAG( 'u', 'n', 'p', 'a' )
-
-  /* */
-
-
-FT_END_HEADER
-
-
-#endif /* TTUNPAT_H_ */
-
-
-/* END */



reply via email to

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