* src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211).
This commit is contained in:
parent
e03214e166
commit
8b76eaf092
|
@ -1,3 +1,8 @@
|
||||||
|
2015-10-15 Bungeman <bungeman@gmail.com>
|
||||||
|
Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
* src/tools/ftfuzzer/ftfuzzer.cc: Handle fixed sizes (#46211).
|
||||||
|
|
||||||
2015-10-15 Werner Lemberg <wl@gnu.org>
|
2015-10-15 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
[base] Compute MD5 checksums only if explicitly requested.
|
[base] Compute MD5 checksums only if explicitly requested.
|
||||||
|
|
|
@ -131,8 +131,25 @@ using namespace std;
|
||||||
&face ) )
|
&face ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// loop over all bitmap stroke sizes
|
||||||
|
// and an arbitrary size for outlines
|
||||||
|
for ( long fixed_sizes_index = 0;
|
||||||
|
fixed_sizes_index < face->num_fixed_sizes + 1;
|
||||||
|
fixed_sizes_index++ )
|
||||||
|
{
|
||||||
|
FT_Int32 flags = load_flags;
|
||||||
|
|
||||||
|
if ( !fixed_sizes_index )
|
||||||
|
{
|
||||||
// set up 20pt at 72dpi as an arbitrary size
|
// set up 20pt at 72dpi as an arbitrary size
|
||||||
FT_Set_Char_Size( face, 20, 20, 72, 72 );
|
FT_Set_Char_Size( face, 20, 20, 72, 72 );
|
||||||
|
flags |= FT_LOAD_NO_BITMAP;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FT_Select_Size( face, fixed_sizes_index - 1 );
|
||||||
|
flags |= FT_LOAD_COLOR;
|
||||||
|
}
|
||||||
|
|
||||||
// test MM interface only for a face without a selected instance
|
// test MM interface only for a face without a selected instance
|
||||||
if ( instance_index == 0 )
|
if ( instance_index == 0 )
|
||||||
|
@ -143,7 +160,7 @@ using namespace std;
|
||||||
glyph_index < (unsigned int)face->num_glyphs;
|
glyph_index < (unsigned int)face->num_glyphs;
|
||||||
glyph_index++ )
|
glyph_index++ )
|
||||||
{
|
{
|
||||||
if ( FT_Load_Glyph( face, glyph_index, load_flags ) )
|
if ( FT_Load_Glyph( face, glyph_index, flags ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Rendering is the most expensive and the least interesting part.
|
// Rendering is the most expensive and the least interesting part.
|
||||||
|
@ -166,7 +183,7 @@ using namespace std;
|
||||||
FT_Outline_Get_BBox( outline, &bbox );
|
FT_Outline_Get_BBox( outline, &bbox );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
}
|
||||||
FT_Done_Face( face );
|
FT_Done_Face( face );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue