ya2 · news · projects · code · about

first commit
[pmachines.git] / lib / engine / font.py
1 from lib.gameobject import GameObject
2
3
4 class FontMgr(GameObject):
5
6 def __init__(self):
7 GameObject.__init__(self)
8 self.__fonts = {}
9
10 def load_font(self, fpath, outline=True):
11 if fpath not in self.__fonts:
12 self.__fonts[fpath] = self.eng.lib.load_font(fpath, outline)
13 return self.__fonts[fpath]
14
15 def destroy(self):
16 self.__fonts = None
17 GameObject.destroy(self)