ref: 7abf0cb758b4b470a0a0671e290669aeefbe0b90
parent: 785833d96eacab4af67dc6be53571441df6d8a5b
author: Werner Lemberg <[email protected]>
date: Sun Apr 30 13:25:11 EDT 2017
[autofit] Fix metrics computation. Problem reported by Markus Trippelsdorf <[email protected]> and Nikolaus Waxweiler <[email protected]>. * 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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2017-04-30 Werner Lemberg <[email protected]>
+
+ [autofit] Fix metrics computation.
+
+ Problem reported by Markus Trippelsdorf <[email protected]> and
+ Nikolaus Waxweiler <[email protected]>.
+
+ * 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 <[email protected]>
* src/truetype/ttdriver.c (tt_size_request): Properly check `error'.
--- 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 )