summaryrefslogtreecommitdiffstats
path: root/src/autofit/afloader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/autofit/afloader.c')
-rw-r--r--src/autofit/afloader.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c
index 4e4373a..4e48c2f 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 );
}