Use ordered dict for storing glyphs.

This commit is contained in:
Andrey Golovizin 2014-08-25 15:29:01 +02:00
parent 4f435b3a38
commit 6d2a6b325b

View file

@ -15,6 +15,7 @@
import pickle
from collections import OrderedDict
from os import path
@ -25,7 +26,7 @@ class GlyphDB(object):
with open(self.filename, 'rb') as fileobj:
self.data = pickle.load(fileobj)
else:
self.data = {}
self.data = OrderedDict()
def __getitem__(self, key):
return self.data.__getitem__(key)