Allow native CFF hinter in FT_RENDER_MODE_LIGHT.
Both the native CFF hinter and the auto-hinter now have a very similar rendering style. * include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no longer implies FT_LOAD_FORCE_AUTOHINT. * include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New macro. * include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New macro. * src/cff/cffdrivr.c (cff_driver_class): Use it. * src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection logic.
This commit is contained in:
parent
2985e4fa30
commit
ccd3188af1
21
ChangeLog
21
ChangeLog
|
@ -1,3 +1,24 @@
|
||||||
|
2015-11-10 Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
|
||||||
|
|
||||||
|
Allow native CFF hinter in FT_RENDER_MODE_LIGHT.
|
||||||
|
|
||||||
|
Both the native CFF hinter and the auto-hinter now have a very
|
||||||
|
similar rendering style.
|
||||||
|
|
||||||
|
* include/freetype/freetype.h: Mention that FT_LOAD_TARGET_LIGHT no
|
||||||
|
longer implies FT_LOAD_FORCE_AUTOHINT.
|
||||||
|
|
||||||
|
* include/freetype/ftmodapi.h (FT_MODULE_DRIVER_HINTS_LIGHTLY): New
|
||||||
|
macro.
|
||||||
|
|
||||||
|
* include/freetype/internal/ftobjs.h (FT_DRIVER_HINTS_LIGHTLY): New
|
||||||
|
macro.
|
||||||
|
|
||||||
|
* src/cff/cffdrivr.c (cff_driver_class): Use it.
|
||||||
|
|
||||||
|
* src/base/ftobjs.c (FT_Load_Glyph): Update auto-hinter selection
|
||||||
|
logic.
|
||||||
|
|
||||||
2015-11-09 Werner Lemberg <wl@gnu.org>
|
2015-11-09 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
* src/cid/cidload.c (cid_face_open): Fix GDBytes guard (#46408).
|
* src/cid/cidload.c (cid_face_open): Fix GDBytes guard (#46408).
|
||||||
|
|
|
@ -2821,9 +2821,6 @@ FT_BEGIN_HEADER
|
||||||
* have specified (e.g., the TrueType bytecode interpreter). You can set
|
* have specified (e.g., the TrueType bytecode interpreter). You can set
|
||||||
* @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.
|
* @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.
|
||||||
*
|
*
|
||||||
* Also note that @FT_LOAD_TARGET_LIGHT is an exception, in that it
|
|
||||||
* always implies @FT_LOAD_FORCE_AUTOHINT.
|
|
||||||
*
|
|
||||||
* @values:
|
* @values:
|
||||||
* FT_LOAD_TARGET_NORMAL ::
|
* FT_LOAD_TARGET_NORMAL ::
|
||||||
* This corresponds to the default hinting algorithm, optimized for
|
* This corresponds to the default hinting algorithm, optimized for
|
||||||
|
@ -2835,8 +2832,6 @@ FT_BEGIN_HEADER
|
||||||
* generated glyphs are more fuzzy but better resemble its original
|
* generated glyphs are more fuzzy but better resemble its original
|
||||||
* shape. A bit like rendering on Mac OS~X.
|
* shape. A bit like rendering on Mac OS~X.
|
||||||
*
|
*
|
||||||
* As a special exception, this target implies @FT_LOAD_FORCE_AUTOHINT.
|
|
||||||
*
|
|
||||||
* FT_LOAD_TARGET_MONO ::
|
* FT_LOAD_TARGET_MONO ::
|
||||||
* Strong hinting algorithm that should only be used for monochrome
|
* Strong hinting algorithm that should only be used for monochrome
|
||||||
* output. The result is probably unpleasant if the glyph is rendered
|
* output. The result is probably unpleasant if the glyph is rendered
|
||||||
|
|
|
@ -117,6 +117,8 @@ FT_BEGIN_HEADER
|
||||||
/* support vector outlines */
|
/* support vector outlines */
|
||||||
#define FT_MODULE_DRIVER_HAS_HINTER 0x400 /* the driver provides its */
|
#define FT_MODULE_DRIVER_HAS_HINTER 0x400 /* the driver provides its */
|
||||||
/* own hinter */
|
/* own hinter */
|
||||||
|
#define FT_MODULE_DRIVER_HINTS_LIGHTLY 0x800 /* the driver's hinter */
|
||||||
|
/* produces LIGHT hints */
|
||||||
|
|
||||||
|
|
||||||
/* deprecated values */
|
/* deprecated values */
|
||||||
|
@ -128,6 +130,7 @@ FT_BEGIN_HEADER
|
||||||
#define ft_module_driver_scalable FT_MODULE_DRIVER_SCALABLE
|
#define ft_module_driver_scalable FT_MODULE_DRIVER_SCALABLE
|
||||||
#define ft_module_driver_no_outlines FT_MODULE_DRIVER_NO_OUTLINES
|
#define ft_module_driver_no_outlines FT_MODULE_DRIVER_NO_OUTLINES
|
||||||
#define ft_module_driver_has_hinter FT_MODULE_DRIVER_HAS_HINTER
|
#define ft_module_driver_has_hinter FT_MODULE_DRIVER_HAS_HINTER
|
||||||
|
#define ft_module_driver_hints_lightly FT_MODULE_DRIVER_HINTS_LIGHTLY
|
||||||
|
|
||||||
|
|
||||||
typedef FT_Pointer FT_Module_Interface;
|
typedef FT_Pointer FT_Module_Interface;
|
||||||
|
|
|
@ -506,6 +506,9 @@ FT_BEGIN_HEADER
|
||||||
#define FT_DRIVER_HAS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
|
#define FT_DRIVER_HAS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
|
||||||
FT_MODULE_DRIVER_HAS_HINTER )
|
FT_MODULE_DRIVER_HAS_HINTER )
|
||||||
|
|
||||||
|
#define FT_DRIVER_HINTS_LIGHTLY( x ) ( FT_MODULE_CLASS( x )->module_flags & \
|
||||||
|
FT_MODULE_DRIVER_HINTS_LIGHTLY )
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
|
|
|
@ -686,7 +686,8 @@
|
||||||
/* check the size of the `fpgm' and `prep' tables, too -- */
|
/* check the size of the `fpgm' and `prep' tables, too -- */
|
||||||
/* the assumption is that there don't exist real TTFs where */
|
/* the assumption is that there don't exist real TTFs where */
|
||||||
/* both `fpgm' and `prep' tables are missing */
|
/* both `fpgm' and `prep' tables are missing */
|
||||||
if ( mode == FT_RENDER_MODE_LIGHT ||
|
if ( ( mode == FT_RENDER_MODE_LIGHT &&
|
||||||
|
!FT_DRIVER_HINTS_LIGHTLY( driver ) ) ||
|
||||||
face->internal->ignore_unpatented_hinter ||
|
face->internal->ignore_unpatented_hinter ||
|
||||||
( FT_IS_SFNT( face ) &&
|
( FT_IS_SFNT( face ) &&
|
||||||
ttface->num_locations &&
|
ttface->num_locations &&
|
||||||
|
|
|
@ -872,7 +872,8 @@
|
||||||
|
|
||||||
FT_MODULE_FONT_DRIVER |
|
FT_MODULE_FONT_DRIVER |
|
||||||
FT_MODULE_DRIVER_SCALABLE |
|
FT_MODULE_DRIVER_SCALABLE |
|
||||||
FT_MODULE_DRIVER_HAS_HINTER,
|
FT_MODULE_DRIVER_HAS_HINTER |
|
||||||
|
FT_MODULE_DRIVER_HINTS_LIGHTLY,
|
||||||
|
|
||||||
sizeof ( CFF_DriverRec ),
|
sizeof ( CFF_DriverRec ),
|
||||||
"cff",
|
"cff",
|
||||||
|
|
Loading…
Reference in New Issue