squash 2 bugs related to the numpy conversion


git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@543 4cde692c-a291-49d1-8350-778aa11640f8
diff --git a/Lib/fontTools/ttLib/sfnt.py b/Lib/fontTools/ttLib/sfnt.py
index 0094ecb..3272f2c 100644
--- a/Lib/fontTools/ttLib/sfnt.py
+++ b/Lib/fontTools/ttLib/sfnt.py
@@ -143,7 +143,7 @@
 	def calcMasterChecksum(self, directory):
 		# calculate checkSumAdjustment
 		tags = self.tables.keys()
-		checksums = numpy.zeros(len(tags)+1)
+		checksums = numpy.zeros(len(tags)+1, numpy.int32)
 		for i in range(len(tags)):
 			checksums[i] = self.tables[tags[i]].checkSum
 		
@@ -158,7 +158,7 @@
 		# write the checksum to the file
 		self.file.seek(self.tables['head'].offset + 8)
 		self.file.write(struct.pack(">l", checksumadjustment))
-		
+
 
 # -- sfnt directory helpers and cruft
 
diff --git a/Lib/fontTools/ttLib/tables/_g_l_y_f.py b/Lib/fontTools/ttLib/tables/_g_l_y_f.py
index 440d3f9..dd60f58 100644
--- a/Lib/fontTools/ttLib/tables/_g_l_y_f.py
+++ b/Lib/fontTools/ttLib/tables/_g_l_y_f.py
@@ -532,6 +532,8 @@
 				compressedflags.append(flag)
 			lastflag = flag
 		data = data + array.array("B", compressedflags).tostring()
+		xPoints = map(int, xPoints)  # work around numpy vs. struct >= 2.5 bug
+		yPoints = map(int, yPoints)
 		data = data + apply(struct.pack, (xFormat,)+tuple(xPoints))
 		data = data + apply(struct.pack, (yFormat,)+tuple(yPoints))
 		return data