ref: 168e39a15b4aed8705ca0105bad1b4854848922b
parent: c24eff8d83fe25629986477c1ad5ede939db8881
author: David Turner <[email protected]>
date: Sat Mar 17 18:25:34 EST 2001
small update to remove compiler warnings
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-03-17 David Turner <[email protected]>
+
+ * 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 <[email protected]>
* src/cff/cffparse.c (cff_parse_font_bbox): Obtain rounded FT_Fixed
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -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] */
--- a/src/cid/cidobjs.c
+++ b/src/cid/cidobjs.c
@@ -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;
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -980,10 +980,10 @@
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
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -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 )
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -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;