catch runtime error of Matplotlib
This does not solve the real problem, but at
least ezdxf does not crash.
@@ -428,7 +428,10 @@ class MatplotlibFont(AbstractFont):
if not text.strip():
return 0
path = self._support_lib.get_text_path(text, self._font_properties)
+ try:
return max(path.vertices[:, 0].tolist()) * self._width_factor
+ except RuntimeError:
+ return 0
class MonospaceFont(AbstractFont):
