small update to remove compiler warnings

This commit is contained in:
David Turner 2001-03-17 23:25:34 +00:00
parent 106adba18c
commit 2160af9c61
6 changed files with 18 additions and 11 deletions

View File

@ -1,3 +1,9 @@
2001-03-17 David Turner <david.turner@freetype.org>
* src/cid/cidobjs.c, src/cid/cidload.c, src/pcf/pcfread.c,
src/type1/t1load.c, src/type1/t1objs.c: added a few casts to remove
compiler warnings in pedantic modes..
2001-03-17 Tom Kacvinsky <tjk@ams.org>
* src/cff/cffparse.c (cff_parse_font_bbox): Obtain rounded FT_Fixed

View File

@ -200,7 +200,7 @@
/* Set Units per EM based on FontMatrix values. We set the value to */
/* `1000/temp_scale', because temp_scale was already multiplied by */
/* 1000 (in t1_tofixed(), from psobjs.c). */
root->units_per_EM = FT_DivFix( 0x10000L,
root->units_per_EM = (FT_UShort)FT_DivFix( 0x10000L,
FT_DivFix( temp_scale, 1000 ) );
/* we need to scale the values by 1.0/temp[3] */

View File

@ -225,8 +225,8 @@
if ( !root->units_per_EM )
root->units_per_EM = 1000;
root->ascender = face->cid.font_bbox.yMax >> 16;
root->descender = face->cid.font_bbox.yMin >> 16;
root->ascender = (FT_Short)(face->cid.font_bbox.yMax >> 16);
root->descender = (FT_Short)(face->cid.font_bbox.yMin >> 16);
root->height = ( ( root->ascender + root->descender ) * 12 )
/ 10;

View File

@ -980,10 +980,10 @@ THE SOFTWARE.
yres = find_property( face, "RESOLUTION_Y" );
if ( ( xres != NULL ) && ( yres != NULL ) )
{
root->available_sizes->width =
prop->value.integer * 75 / xres->value.integer;
root->available_sizes->height =
prop->value.integer * 75 / yres->value.integer;
root->available_sizes->width = (FT_Short)
(prop->value.integer * 75 / xres->value.integer);
root->available_sizes->height = (FT_Short)
(prop->value.integer * 75 / yres->value.integer);
}
}
else

View File

@ -894,7 +894,8 @@
/* Set Units per EM based on FontMatrix values. We set the value to */
/* 1000 / temp_scale, because temp_scale was already multiplied by */
/* 1000 (in t1_tofixed, from psobjs.c). */
root->units_per_EM = FT_DivFix( 0x10000L, FT_DivFix( temp_scale, 1000 ) );
root->units_per_EM = (FT_UShort)FT_DivFix( 0x10000L,
FT_DivFix( temp_scale, 1000 ) );
/* we need to scale the values by 1.0/temp_scale */
if ( temp_scale != 0x10000L )

View File

@ -274,14 +274,14 @@
if ( !root->units_per_EM )
root->units_per_EM = 1000;
root->ascender = face->type1.font_bbox.yMax >> 16;
root->descender = face->type1.font_bbox.yMin >> 16;
root->ascender = (FT_Short)(face->type1.font_bbox.yMax >> 16);
root->descender = (FT_Short)(face->type1.font_bbox.yMin >> 16);
root->height = ( ( root->ascender - root->descender ) * 12 ) / 10;
/* now compute the maximum advance width */
root->max_advance_width = face->type1.font_bbox.xMax >> 16;
root->max_advance_width = (FT_Short)(face->type1.font_bbox.xMax >> 16);
{
FT_Int max_advance;