The incremental interface now passes the old metrics when asking for
replacement metrics so that they can be modified, not just replaced.
For example, CFF fonts need this.
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index 0a3155d..6ebb872 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -76,7 +76,7 @@
glyph_index, char_string );
else
-#endif
+#endif /* FT_CONFIG_OPTION_INCREMENTAL */
/* For ordinary fonts get the character data stored in the face record. */
{
@@ -95,23 +95,21 @@
if ( !error && face->root.internal->incremental_interface &&
face->root.internal->incremental_interface->funcs->get_glyph_metrics )
{
- FT_Bool found = FALSE;
FT_Incremental_MetricsRec metrics;
-
+ metrics.bearing_x = decoder->builder.left_bearing.x;
+ metrics.bearing_y = decoder->builder.left_bearing.y;
+ metrics.advance = decoder->builder.advance.x;
error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
face->root.internal->incremental_interface->object,
- glyph_index, FALSE, &metrics, &found );
- if ( found )
- {
- decoder->builder.left_bearing.x = metrics.bearing_x;
- decoder->builder.left_bearing.y = metrics.bearing_y;
- decoder->builder.advance.x = metrics.advance;
- decoder->builder.advance.y = 0;
- }
+ glyph_index, FALSE, &metrics );
+ decoder->builder.left_bearing.x = metrics.bearing_x;
+ decoder->builder.left_bearing.y = metrics.bearing_y;
+ decoder->builder.advance.x = metrics.advance;
+ decoder->builder.advance.y = 0;
}
-#endif
+#endif /* FT_CONFIG_OPTION_INCREMENTAL */
return error;
}
@@ -137,7 +135,7 @@
face->root.internal->incremental_interface->object,
&glyph_data );
}
-#endif
+#endif /* FT_CONFIG_OPTION_INCREMENTAL */
return error;
}