Simplify cmap subtable format 4 idDelta code
diff --git a/Lib/fontTools/ttLib/tables/_c_m_a_p.py b/Lib/fontTools/ttLib/tables/_c_m_a_p.py
index 9dea010..d0c6c41 100644
--- a/Lib/fontTools/ttLib/tables/_c_m_a_p.py
+++ b/Lib/fontTools/ttLib/tables/_c_m_a_p.py
@@ -694,28 +694,6 @@
 			getGlyphName = self.ttFont.getGlyphName
 			names = list(map(getGlyphName, gids ))
 		list(map(operator.setitem, [cmap]*lenCmap, charCodes, names))
-		
-
-
-	def setIDDelta(self, idDelta):
-		# The lowest gid in glyphIndexArray, after subtracting idDelta, must be 1.
-		# idDelta is a short, and must be between -32K and 32K
-		# startCode can be between 0 and 64K-1, and the first glyph index can be between 1 and 64K-1
-		# This means that we have a problem because we can need to assign to idDelta values
-		# between -(64K-2) and 64K -1.
-		# Since the final gi is reconstructed from the glyphArray GID by:
-		#    (short)finalGID = (gid +  idDelta) % 0x10000),
-		# we can get from a startCode of 0 to a final GID of 64 -1K by subtracting 1, and casting the
-		# negative number to an unsigned short.
-		# Similarly , we can get from a startCode of 64K-1 to a final GID of 1 by adding 2, because of
-		# the modulo arithmetic.
-
-		if idDelta > 0x7FFF:
-			idDelta = idDelta - 0x10000
-		elif idDelta <  -0x8000:
-			idDelta = idDelta + 0x10000
-
-		return idDelta
 
 
 	def compile(self, ttFont):
@@ -787,8 +765,7 @@
 			for charCode in range(startCode[i], endCode[i] + 1):
 				indices.append(cmap[charCode])
 			if  (indices == list(range(indices[0], indices[0] + len(indices)))):
-				idDeltaTemp = self.setIDDelta(indices[0] - startCode[i])
-				idDelta.append( idDeltaTemp)
+				idDelta.append((indices[0] - startCode[i]) % 0x10000)
 				idRangeOffset.append(0)
 			else:
 				# someone *definitely* needs to get killed.
@@ -807,7 +784,7 @@
 		rangeShift = 2 * segCount - searchRange
 		
 		charCodeArray = array.array("H", endCode + [0] + startCode)
-		idDeltaArray = array.array("h", idDelta)
+		idDeltaArray = array.array("H", idDelta)
 		restArray = array.array("H", idRangeOffset + glyphIndexArray)
 		if sys.byteorder != "big":
 			charCodeArray.byteswap()