From 825b7ea2f2740eacbda85c65d771da43ee399a6a Mon Sep 17 00:00:00 2001
From: Werner Lemberg <wl@gnu.org>
Date: Mon, 12 Jul 2021 22:11:24 +0200
Subject: [PATCH] [autofit] More clean-ups.

* src/autofit/afhints.h (AF_GlyphHintsRec): Remove the no longer
needed fields `xmin_delta` and `xmax_delta`.

* src/autofit/afhints.c (af_glyph_hints_reload),
src/autofit/afloader.c (af_loader_load_glyph): Updated.
---
 ChangeLog              | 10 ++++++++++
 src/autofit/afhints.c  |  3 ---
 src/autofit/afhints.h  |  3 ---
 src/autofit/afloader.c |  4 ++--
 4 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 39a45d80d..677cd36a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2021-07-12  Werner Lemberg  <wl@gnu.org>
+
+	[autofit] More clean-ups.
+
+	* src/autofit/afhints.h (AF_GlyphHintsRec): Remove the no longer
+	needed fields `xmin_delta` and `xmax_delta`.
+
+	* src/autofit/afhints.c (af_glyph_hints_reload),
+	src/autofit/afloader.c (af_loader_load_glyph): Updated.
+
 2021-07-12  Werner Lemberg  <wl@gnu.org>
 
 	Small clean-ups for the last few commits.
diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c
index 5976a6cf7..4bf6d66dd 100644
--- a/src/autofit/afhints.c
+++ b/src/autofit/afhints.c
@@ -953,9 +953,6 @@
     hints->x_delta = x_delta;
     hints->y_delta = y_delta;
 
-    hints->xmin_delta = 0;
-    hints->xmax_delta = 0;
-
     points = hints->points;
     if ( hints->num_points == 0 )
       goto Exit;
diff --git a/src/autofit/afhints.h b/src/autofit/afhints.h
index 9f3639261..38d2847d7 100644
--- a/src/autofit/afhints.h
+++ b/src/autofit/afhints.h
@@ -362,9 +362,6 @@ FT_BEGIN_HEADER
                                     /* implementations         */
     AF_StyleMetrics  metrics;
 
-    FT_Pos           xmin_delta;    /* used for warping */
-    FT_Pos           xmax_delta;
-
     /* Two arrays to avoid allocation penalty.            */
     /* The `embedded' structure must be the last element! */
     struct
diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c
index b2cfd69e9..a06d49ad7 100644
--- a/src/autofit/afloader.c
+++ b/src/autofit/afloader.c
@@ -473,8 +473,8 @@
           FT_Pos  pp2x = loader->pp2.x;
 
 
-          loader->pp1.x = FT_PIX_ROUND( pp1x + hints->xmin_delta );
-          loader->pp2.x = FT_PIX_ROUND( pp2x + hints->xmax_delta );
+          loader->pp1.x = FT_PIX_ROUND( pp1x );
+          loader->pp2.x = FT_PIX_ROUND( pp2x );
 
           slot->lsb_delta = loader->pp1.x - pp1x;
           slot->rsb_delta = loader->pp2.x - pp2x;