autofit: Count the size of the memory object by ptrdiff_t.

This commit is contained in:
suzuki toshiya 2009-08-01 00:32:07 +09:00
parent 15dc278c5a
commit b56680240a
5 changed files with 26 additions and 6 deletions

View File

@ -1,3 +1,23 @@
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'.

View File

@ -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;

View File

@ -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 )

View File

@ -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;

View File

@ -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;