diff --git a/ChangeLog b/ChangeLog index 28723f05..436323d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-02-17 Jonathan Blow + + * src/autofit/afloader.c (af_loader_load_g, af_loader_load_glyph): + Check for valid callback pointers. + 2008-02-15 suzuki toshiya * src/base/ftmac.c (FT_New_Face_From_SFNT): Check the sfnt resource diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c index 4e4373a4..4e48c2fe 100644 --- a/src/autofit/afloader.c +++ b/src/autofit/afloader.c @@ -4,7 +4,7 @@ /* */ /* Auto-fitter glyph loading routines (body). */ /* */ -/* Copyright 2003, 2004, 2005, 2006, 2007 by */ +/* Copyright 2003, 2004, 2005, 2006, 2007, 2008 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -165,9 +165,10 @@ /* now load the slot image into the auto-outline and run the */ /* automatic hinting process */ - metrics->clazz->script_hints_apply( hints, - &gloader->current.outline, - metrics ); + if ( metrics->clazz->script_hints_apply ) + metrics->clazz->script_hints_apply( hints, + &gloader->current.outline, + metrics ); /* we now need to hint the metrics according to the change in */ /* width/positioning that occurred during the hinting process */ @@ -515,9 +516,13 @@ load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_IGNORE_TRANSFORM; load_flags &= ~FT_LOAD_RENDER; - error = metrics->clazz->script_hints_init( &loader->hints, metrics ); - if ( error ) - goto Exit; + if ( metrics->clazz->script_hints_init ) + { + error = metrics->clazz->script_hints_init( &loader->hints, + metrics ); + if ( error ) + goto Exit; + } error = af_loader_load_g( loader, &scaler, gindex, load_flags, 0 ); }