autofit: Count the size of the memory object by ptrdiff_t.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
diff --git a/ChangeLog b/ChangeLog
index 4c83ac9..7798e46 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,25 @@
2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ autofit: Count the size of the memory object by ptrdiff_t.
+
+ * src/autofit/afcjk.c (af_cjk_hint_edges): The
+ number of edges `n_edges' should be counted by
+ FT_PtrDist variable instead of FT_Int.
+
+ * src/autofit/aflatin.c (af_latin_hint_edges):
+ Ditto.
+
+ * src/autofit/aftypes.h: In AF_ScriptClassRec,
+ the size of metric `script_metrics_size' should
+ be counted by FT_Offset variable instead of FT_UInt.
+
+ * src/autofit/afhints.c
+ (af_glyph_hints_align_strong_points): The cursors
+ for the edges `min', `max', `mid' in the memory
+ buffer should be typed FT_PtrDist.
+
+2009-07-31 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
autofit: Fix for unused variable `first'.
* src/autofit/afhints.c (af_glyph_hints_reload): Insert
diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c
index 9e0cea8..bab0c42 100644
--- a/src/autofit/afcjk.c
+++ b/src/autofit/afcjk.c
@@ -1020,7 +1020,7 @@
AF_AxisHints axis = &hints->axis[dim];
AF_Edge edges = axis->edges;
AF_Edge edge_limit = edges + axis->num_edges;
- FT_Int n_edges;
+ FT_PtrDist n_edges;
AF_Edge edge;
AF_Edge anchor = 0;
FT_Pos delta = 0;
diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c
index e175b04..8396a20 100644
--- a/src/autofit/afhints.c
+++ b/src/autofit/afhints.c
@@ -941,8 +941,8 @@
}
{
- FT_UInt min, max, mid;
- FT_Pos fpos;
+ FT_PtrDist min, max, mid;
+ FT_Pos fpos;
/* find enclosing edges */
@@ -953,7 +953,7 @@
/* for small edge counts, a linear search is better */
if ( max <= 8 )
{
- FT_UInt nn;
+ FT_PtrDist nn;
for ( nn = 0; nn < max; nn++ )
if ( edges[nn].fpos >= u )
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index 062f863..252703e 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -1701,7 +1701,7 @@
AF_AxisHints axis = &hints->axis[dim];
AF_Edge edges = axis->edges;
AF_Edge edge_limit = edges + axis->num_edges;
- FT_Int n_edges;
+ FT_PtrDist n_edges;
AF_Edge edge;
AF_Edge anchor = 0;
FT_Int has_serifs = 0;
diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h
index 71c9bad..5574f0c 100644
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -332,7 +332,7 @@ extern void* _af_debug_hints;
AF_Script script;
AF_Script_UniRange script_uni_ranges; /* last must be { 0, 0 } */
- FT_UInt script_metrics_size;
+ FT_Offset script_metrics_size;
AF_Script_InitMetricsFunc script_metrics_init;
AF_Script_ScaleMetricsFunc script_metrics_scale;
AF_Script_DoneMetricsFunc script_metrics_done;