shithub: freetype+ttf2subf

Download patch

ref: a813cf4801d933833ae23d39643836bfd88e6367
parent: 2bbcb7edd86cd9cb77dbfe8fb09426167df5a275
author: suzuki toshiya <[email protected]>
date: Fri Jul 31 20:30:15 EDT 2009

cff: Fix some data types mismatching with their sources.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2009-07-31  suzuki toshiya <[email protected]>
 
+	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 <[email protected]>
+
 	bdf: Fix some data types mismatching with their sources.
 
 	* bdflib.c (_bdf_list_ensure): The type of `num_items'
--- 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;
--- 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;