From ada829717574e7cdbfe373e08dbb2e14ea4369ab Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 22 Dec 2016 08:25:42 +0100 Subject: [PATCH] [ftfuzzer] Always use Adobe CFF engine. * src/tools/ftfuzzer/ftfuzzer.cc (FT_Global::FT_Global): Implement it. --- ChangeLog | 7 +++++++ src/tools/ftfuzzer/ftfuzzer.cc | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index 281d2ca59..861eca955 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2016-12-22 Werner Lemberg + + [ftfuzzer] Always use Adobe CFF engine. + + * src/tools/ftfuzzer/ftfuzzer.cc (FT_Global::FT_Global): Implement + it. + 2016-12-21 Werner Lemberg * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko. diff --git a/src/tools/ftfuzzer/ftfuzzer.cc b/src/tools/ftfuzzer/ftfuzzer.cc index 79ad30556..be8a473ae 100644 --- a/src/tools/ftfuzzer/ftfuzzer.cc +++ b/src/tools/ftfuzzer/ftfuzzer.cc @@ -55,6 +55,14 @@ struct FT_Global { FT_Global() { InitResult = FT_Init_FreeType( &library ); + if ( InitResult ) + return; + + // try to activate Adobe's CFF engine; it might not be the default + unsigned int cff_hinting_engine = FT_CFF_HINTING_ADOBE; + FT_Property_Set( library, + "cff", + "hinting-engine", &cff_hinting_engine ); } ~FT_Global() { FT_Done_FreeType( library );