[ftfuzzer] Minor improvements.

* src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore
invalid strikes.
Use better values for call to `FT_Set_Char_Size'.
This commit is contained in:
Werner Lemberg 2016-09-09 22:13:33 +02:00
parent d609b7c158
commit deb261556a
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2016-09-09 Werner Lemberg <wl@gnu.org>
[ftfuzzer] Minor improvements.
* src/tools/ftfuzzer/ftfuzzer.cc (LLVMFuzzerTestOneInput): Ignore
invalid strikes.
Use better values for call to `FT_Set_Char_Size'.
2016-09-09 Werner Lemberg <wl@gnu.org>
[sfnt] Don't provide (completely) broken strike data.

View File

@ -257,12 +257,14 @@
if ( !fixed_sizes_index )
{
// set up 20pt at 72dpi as an arbitrary size
FT_Set_Char_Size( face, 20, 20, 72, 72 );
if ( FT_Set_Char_Size( face, 20 * 64, 20 * 64, 72, 72 ) );
continue;
flags |= FT_LOAD_NO_BITMAP;
}
else
{
FT_Select_Size( face, fixed_sizes_index - 1 );
if ( FT_Select_Size( face, fixed_sizes_index - 1 ) )
continue;
flags |= FT_LOAD_COLOR;
}