[autofit] Fix metrics computation. Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de> and Nikolaus Waxweiler <madigens@gmail.com>. * src/base/ftobjs.c (FT_Request_Size): Trigger recomputation of auto-hinter metrics. Without this change, multiple size changing calls for a single face fail.
diff --git a/ChangeLog b/ChangeLog
index f4d31fb..b1ad07b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2017-04-30 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Fix metrics computation.
+
+ Problem reported by Markus Trippelsdorf <markus@trippelsdorf.de> and
+ Nikolaus Waxweiler <madigens@gmail.com>.
+
+ * src/base/ftobjs.c (FT_Request_Size): Trigger recomputation of
+ auto-hinter metrics. Without this change, multiple size changing
+ calls for a single face fail.
+
2017-04-29 Werner Lemberg <wl@gnu.org>
* src/truetype/ttdriver.c (tt_size_request): Properly check `error'.
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 7a9169b..cbc7713 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -3061,6 +3061,10 @@
req->type >= FT_SIZE_REQUEST_TYPE_MAX )
return FT_THROW( Invalid_Argument );
+ /* signal the auto-hinter to recompute its size metrics */
+ /* (if requested) */
+ face->size->internal->autohint_metrics.x_scale = 0;
+
clazz = face->driver->clazz;
if ( clazz->request_size )