Add missing ChangeLog entry, copyright notices, whitespace, formatting.

This commit is contained in:
Werner Lemberg 2017-12-27 08:06:47 +01:00
parent a956e36c8d
commit dd6330d74b
6 changed files with 59 additions and 5 deletions

View File

@ -1,3 +1,26 @@
2017-12-25 Ewald Hew <ewaldhew@gmail.com>
Move PostScript drivers' property handlers to `base'.
This reduces the amount of duplicated code across PostScript
drivers.
* src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c
({cff,cid,t1}_property_{get,set}): Moved to...
* include/freetype/internal/ftpsprop.h: ...this new file.
(ps_property_{get,set}): New functions to replace moved ones.
* src/base/ftpsprop.c: New file that implements above functions.
* include/freetype/internal/internal.h
(FT_INTERNAL_POSTSCRIPT_PROPS_H): New macro.
* src/cff/cffdrivr.c, src/cid/cidriver.c, src/type1/t1driver.c:
Updated.
* src/base/Jamfile, src/base/rules.mk (BASE_SRC), src/base/ftbase.c:
Updated.
2017-12-20 Werner Lemberg <wl@gnu.org>
Speed up FT_Set_Var_{Design,Blend}_Coordinates if curr == new.

View File

@ -4,6 +4,15 @@
/* */
/* Get and set properties of PostScript drivers (specification). */
/* */
/* 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. */
/* */
/***************************************************************************/

View File

@ -5,7 +5,15 @@
/* Get and set properties of PostScript drivers (body). */
/* See `ftdriver.h' for available properties. */
/* */
/* Copyright */
/* 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. */
/* */
/***************************************************************************/
@ -86,9 +94,11 @@
return error;
}
else if ( !ft_strcmp( property_name, "hinting-engine" ) )
{
#if defined(CFF_CONFIG_OPTION_OLD_ENGINE) || defined(T1_CONFIG_OPTION_OLD_ENGINE)
#if defined( CFF_CONFIG_OPTION_OLD_ENGINE ) || \
defined( T1_CONFIG_OPTION_OLD_ENGINE )
const char* module_name = module->clazz->module_name;
#endif
@ -101,17 +111,20 @@
if ( !ft_strcmp( s, "adobe" ) )
driver->hinting_engine = FT_HINTING_ADOBE;
#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
else if ( !ft_strcmp( module_name, "cff" ) &&
!ft_strcmp( s, "freetype" ) )
!ft_strcmp( s, "freetype" ) )
driver->hinting_engine = FT_HINTING_FREETYPE;
#endif
#ifdef T1_CONFIG_OPTION_OLD_ENGINE
else if ( ( !ft_strcmp( module_name, "type1" ) ||
!ft_strcmp( module_name, "t1cid" ) ) &&
!ft_strcmp( s, "freetype" ) )
!ft_strcmp( s, "freetype" ) )
driver->hinting_engine = FT_HINTING_FREETYPE;
#endif
else
return FT_THROW( Invalid_Argument );
}
@ -124,7 +137,7 @@
if ( *hinting_engine == FT_HINTING_ADOBE
#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
|| ( *hinting_engine == FT_HINTING_FREETYPE &&
!ft_strcmp( module_name, "cff" ) )
!ft_strcmp( module_name, "cff" ) )
#endif
#ifdef T1_CONFIG_OPTION_OLD_ENGINE
|| ( *hinting_engine == FT_HINTING_FREETYPE &&
@ -139,6 +152,7 @@
return error;
}
}
else if ( !ft_strcmp( property_name, "no-stem-darkening" ) )
{
#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
@ -164,6 +178,7 @@
return error;
}
else if ( !ft_strcmp( property_name, "random-seed" ) )
{
FT_Int32 random_seed;
@ -221,6 +236,7 @@
return error;
}
else if ( !ft_strcmp( property_name, "hinting-engine" ) )
{
FT_UInt hinting_engine = driver->hinting_engine;
@ -231,6 +247,7 @@
return error;
}
else if ( !ft_strcmp( property_name, "no-stem-darkening" ) )
{
FT_Bool no_stem_darkening = driver->no_stem_darkening;
@ -247,3 +264,5 @@
return FT_THROW( Missing_Property );
}
/* END */

View File

@ -821,6 +821,7 @@
* PROPERTY SERVICE
*
*/
FT_DEFINE_SERVICE_PROPERTIESREC(
cff_service_properties,

View File

@ -176,6 +176,7 @@
* PROPERTY SERVICE
*
*/
FT_DEFINE_SERVICE_PROPERTIESREC(
cid_service_properties,

View File

@ -621,6 +621,7 @@
* PROPERTY SERVICE
*
*/
FT_DEFINE_SERVICE_PROPERTIESREC(
t1_service_properties,