- removed the raise statement in do_worker_task() function as this is fatal in conjunction with PyQt5
- added a try - except clause for the situations when for a font can't be determined the family and name - moved font parsing to the Geometry Editor: it is done everytime the Text tool is invoked - made sure that the HPGL postprocessor is not populated in the Excellon postprocessors in Preferences as it make no sense (HPGL is useful only for Geometries)
This commit is contained in:
@@ -229,7 +229,11 @@ class ParseFont():
|
||||
# split the installed fonts by type: regular, bold, italic (oblique), bold-italic and
|
||||
# store them in separate dictionaries {name: file_path/filename.ttf}
|
||||
for font in system_fonts:
|
||||
name, family = ParseFont.get_font_name(font)
|
||||
try:
|
||||
name, family = ParseFont.get_font_name(font)
|
||||
except Exception as e:
|
||||
log.debug("ParseFont.get_fonts_by_types() --> Could not get the font name. %s" % str(e))
|
||||
continue
|
||||
|
||||
if 'Bold' in name and 'Italic' in name:
|
||||
name = name.replace(" Bold Italic", '')
|
||||
|
||||
Reference in New Issue
Block a user