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.
This commit is contained in:
Werner Lemberg 2017-12-06 23:15:54 +01:00
parent 71fecc539e
commit ed7f091323
12 changed files with 242 additions and 209 deletions

View File

@ -1,3 +1,21 @@
2017-12-06 Werner Lemberg <wl@gnu.org>
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 <wl@gnu.org>
Improve tracing messages by using singular and plural forms.

View File

@ -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>
/*

View File

@ -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.

View File

@ -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!"
@ -501,30 +502,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:

View File

@ -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' )
/* */

View File

@ -60,6 +60,7 @@
/* pfr_fonts */
/* winfnt_fonts */
/* font_formats */
/* parameter_tags */
/* gasp_table */
/* */
/***************************************************************************/

View File

@ -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' )
/* */

View File

@ -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

206
include/freetype/ftparams.h Normal file
View File

@ -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 */

View File

@ -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
/* */

View File

@ -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' )
/* */

View File

@ -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 <graham.asher@btinternet.com> */
/* */
/* 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 */