ref: ed7f091323d0de6e45c657f66d616681fbf8d30f
parent: 71fecc539e135d2f5a0295e433693f8090811e26
author: Werner Lemberg <[email protected]>
date: Wed Dec 6 18:15:54 EST 2017
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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2017-12-06 Werner Lemberg <[email protected]>
+
+ 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 <[email protected]>
Improve tracing messages by using singular and plural forms.
--- 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>
/*
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -3795,17 +3795,18 @@
* 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.
--- 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!"
@@ -499,30 +500,6 @@
* 2.6.2
*
*/
-
-
- /**************************************************************************
- *
- * @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' )
/**************************************************************************
--- 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!"
@@ -307,25 +308,6 @@
* 2.8
*
*/
-
-
- /**************************************************************************
- *
- * @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' )
/* */
--- a/include/freetype/ftchapters.h
+++ b/include/freetype/ftchapters.h
@@ -60,6 +60,7 @@
/* pfr_fonts */
/* winfnt_fonts */
/* font_formats */
+/* parameter_tags */
/* gasp_table */
/* */
/***************************************************************************/
--- 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!"
@@ -330,18 +331,6 @@
*/
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' )
/* */
--- 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!"
@@ -278,26 +279,6 @@
FT_EXPORT( FT_Error )
FT_Library_SetLcdFilterWeights( FT_Library library,
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' )
/*
--- /dev/null
+++ b/include/freetype/ftparams.h
@@ -1,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 */
--- 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!"
@@ -240,53 +241,6 @@
FT_UInt langID,
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
/* */
--- 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!"
@@ -95,21 +96,6 @@
#define FT_T1_HINTING_FREETYPE 0
#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' )
/* */
--- a/include/freetype/ttunpat.h
+++ /dev/null
@@ -1,63 +1,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 <[email protected]> */
-/* */
-/* 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 */