updated project saving
This commit is contained in:
parent
a39851bb61
commit
410fa0a5d3
@ -19,7 +19,7 @@ class Project:
|
||||
|
||||
|
||||
def load(self,path):
|
||||
with open(path, "r") as f:
|
||||
with open(path, "r", encoding="utf-8") as f:
|
||||
project_data = json.load(f)
|
||||
if not "char_width" in project_data or not "char_height" in project_data:
|
||||
raise AttributeError("Character metrics information not found")
|
||||
@ -37,12 +37,12 @@ class Project:
|
||||
|
||||
def save(self,path):
|
||||
# save project data to file
|
||||
with open(path, "w") as f:
|
||||
with open(path, "w", encoding="utf-8") as f:
|
||||
json.dump({
|
||||
"char_width": self.char_res[0],
|
||||
"char_height": self.char_res[1],
|
||||
"chars": self.chars
|
||||
}, f, indent=4)
|
||||
}, f, indent=4, ensure_ascii=False)
|
||||
self.path=path
|
||||
self.loaded=True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user