Ejemplo n.º 1
0
 def __init__(self, filename=None):
     super(Font, self).__init__()
     self.__anim = Animation()
     self.char_size = None
     self.bitmap = None
     if filename != None:
         self.load(filename)
Ejemplo n.º 2
0
	def save(self, filename):
		"""Save the font to the given path."""
		out = Animation()
		out.width = self.__anim.width
		out.height = self.__anim.height
		out.frames = [self.bitmap, Frame(out.width, out.height)]
		for i in range(96):
			out.frames[1].set_dot(i%self.__anim.width, i/self.__anim.width, self.char_widths[i])
		out.save(filename)