- added a status message for font parsing

This commit is contained in:
Marius Stanciu
2019-01-11 04:02:02 +02:00
committed by Marius S
parent 5b7fe5ef11
commit 18de843fc1
3 changed files with 10 additions and 3 deletions

View File

@@ -182,9 +182,11 @@ class ParseFont():
break
return name, family
def __init__(self, parent=None):
def __init__(self, app, parent=None):
super(ParseFont, self).__init__()
self.app = app
# regular fonts
self.regular_f = {}
# bold fonts
@@ -281,8 +283,9 @@ class ParseFont():
elif font_type == 'regular':
path_filename = regular_dict[font_name]
except Exception as e:
self.app.inform.emit("[error_notcl] Font not supported, try another one.")
log.debug("[error_notcl] Font Loading: %s" % str(e))
return"[ERROR] Font Loading: %s" % str(e)
return "flatcam font parse failed"
face = ft.Face(path_filename)
face.set_char_size(int(font_size) * 64)