diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c index 38bfdcc37..4a42d9194 100644 --- a/src/autofit/aflatin.c +++ b/src/autofit/aflatin.c @@ -3468,7 +3468,7 @@ } while ( p != first_point ); /* Align bottom of the tilde to the grid. */ - min_y_rounded = FT_PIX_ROUND( min_y ); + min_y_rounded = FT_PIX_ROUND_LONG( min_y ); delta = SUB_LONG( min_y_rounded, min_y ); height = SUB_LONG( max_y, min_y ); @@ -3508,7 +3508,7 @@ } while ( p != first_point ); - max_y_rounded = FT_PIX_ROUND( max_y ); + max_y_rounded = FT_PIX_ROUND_LONG( max_y ); delta = SUB_LONG( max_y_rounded, max_y ); height = SUB_LONG( max_y, min_y ); diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c index 737b454b6..4e2ac1f1c 100644 --- a/src/autofit/afloader.c +++ b/src/autofit/afloader.c @@ -524,11 +524,11 @@ bbox.xMin = FT_PIX_FLOOR( bbox.xMin ); bbox.yMin = FT_PIX_FLOOR( bbox.yMin ); - bbox.xMax = FT_PIX_CEIL( bbox.xMax ); - bbox.yMax = FT_PIX_CEIL( bbox.yMax ); + bbox.xMax = FT_PIX_CEIL_LONG( bbox.xMax ); + bbox.yMax = FT_PIX_CEIL_LONG( bbox.yMax ); - slot->metrics.width = bbox.xMax - bbox.xMin; - slot->metrics.height = bbox.yMax - bbox.yMin; + slot->metrics.width = SUB_LONG( bbox.xMax, bbox.xMin ); + slot->metrics.height = SUB_LONG( bbox.yMax, bbox.yMin ); slot->metrics.horiBearingX = bbox.xMin; slot->metrics.horiBearingY = bbox.yMax;