Commit a813cf4801d933833ae23d39643836bfd88e6367

suzuki toshiya 2009-08-01T00:30:15

cff: Fix some data types mismatching with their sources.

diff --git a/ChangeLog b/ChangeLog
index d0a9a91..dcbb1d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2009-07-31  suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
 
+	cff: Fix some data types mismatching with their sources.
+
+	* src/cff/cffgload.c (cff_slot_load): The types of	
+	`top_upm' and `sub_upm' are matched with
+	CFF_FontRecDict->units_per_em.
+
+	* src/cff/cffobjs.c (cff_size_select): Ditto.
+	(cff_size_request): Ditto.
+
+2009-07-31  suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
 	bdf: Fix some data types mismatching with their sources.
 
 	* bdflib.c (_bdf_list_ensure): The type of `num_items'
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 7074160..e32d890 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -2580,8 +2580,8 @@
       FT_Byte  fd_index = cff_fd_select_get( &cff->fd_select,
                                              glyph_index );
 
-      FT_Int  top_upm = cff->top_font.font_dict.units_per_em;
-      FT_Int  sub_upm = cff->subfonts[fd_index]->font_dict.units_per_em;
+      FT_ULong  top_upm = cff->top_font.font_dict.units_per_em;
+      FT_ULong  sub_upm = cff->subfonts[fd_index]->font_dict.units_per_em;
 
 
       font_matrix = cff->subfonts[fd_index]->font_dict.font_matrix;
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index d526512..9528815 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -224,8 +224,8 @@
       CFF_Font      font     = (CFF_Font)face->extra.data;
       CFF_Internal  internal = (CFF_Internal)size->internal;
 
-      FT_Int   top_upm  = font->top_font.font_dict.units_per_em;
-      FT_UInt  i;
+      FT_ULong  top_upm  = font->top_font.font_dict.units_per_em;
+      FT_UInt   i;
 
 
       funcs->set_scale( internal->topfont,
@@ -235,7 +235,7 @@
       for ( i = font->num_subfonts; i > 0; i-- )
       {
         CFF_SubFont  sub     = font->subfonts[i - 1];
-        FT_Int       sub_upm = sub->font_dict.units_per_em;
+        FT_ULong     sub_upm = sub->font_dict.units_per_em;
         FT_Pos       x_scale, y_scale;
 
 
@@ -296,8 +296,8 @@
       CFF_Font      font     = (CFF_Font)cffface->extra.data;
       CFF_Internal  internal = (CFF_Internal)size->internal;
 
-      FT_Int   top_upm  = font->top_font.font_dict.units_per_em;
-      FT_UInt  i;
+      FT_ULong  top_upm  = font->top_font.font_dict.units_per_em;
+      FT_UInt   i;
 
 
       funcs->set_scale( internal->topfont,
@@ -307,7 +307,7 @@
       for ( i = font->num_subfonts; i > 0; i-- )
       {
         CFF_SubFont  sub     = font->subfonts[i - 1];
-        FT_Int       sub_upm = sub->font_dict.units_per_em;
+        FT_ULong     sub_upm = sub->font_dict.units_per_em;
         FT_Pos       x_scale, y_scale;