You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Trying to draw a DXF file fails with a ValueError("invalid width, no usable space left"):
loading file "mtext_empty.dxf"...
findfont: Font family ['dgn000'] not found. Falling back to DejaVu Sans.
Traceback (most recent call last):
File "/home/vscode/.local/bin/ezdxf", line 8, in<module>sys.exit(main())
File "/home/vscode/.local/lib/python3.10/site-packages/ezdxf/__main__.py", line 98, in main
run(args)
File "/home/vscode/.local/lib/python3.10/site-packages/ezdxf/commands.py", line 390, in run
frontend.draw_layout(layout, finalize=True)
File "/home/vscode/.local/lib/python3.10/site-packages/ezdxf/addons/drawing/frontend.py", line 242, in draw_layout
self.draw_entities(
File "/home/vscode/.local/lib/python3.10/site-packages/ezdxf/addons/drawing/frontend.py", line 259, in draw_entities
_draw_entities(self, self.ctx, entities, filter_func=filter_func)
File "/home/vscode/.local/lib/python3.10/site-packages/ezdxf/addons/drawing/frontend.py", line 1030, in _draw_entities
frontend.draw_entity(entity, properties)
File "/home/vscode/.local/lib/python3.10/site-packages/ezdxf/addons/drawing/frontend.py", line 278, in draw_entity
draw_method(entity, properties)
File "/home/vscode/.local/lib/python3.10/site-packages/ezdxf/addons/drawing/frontend.py", line 359, in draw_mtext_entity
self.draw_complex_mtext(mtext, properties)
File "/home/vscode/.local/lib/python3.10/site-packages/ezdxf/addons/drawing/frontend.py", line 372, in draw_complex_mtext
complex_mtext_renderer(self.ctx, self._designer, mtext, properties)
File "/home/vscode/.local/lib/python3.10/site-packages/ezdxf/addons/drawing/mtext_complex.py", line 185, in complex_mtext_renderer
layout_engine = cmr.layout_engine(mtext)
File "/home/vscode/.local/lib/python3.10/site-packages/ezdxf/render/abstract_mtext_renderer.py", line 294, in layout_engine
append_paragraph()
File "/home/vscode/.local/lib/python3.10/site-packages/ezdxf/render/abstract_mtext_renderer.py", line 245, in append_paragraph
layout.append_paragraphs([paragraph])
File "/home/vscode/.local/lib/python3.10/site-packages/ezdxf/tools/text_layout.py", line 1265, in append_paragraphs
remainder = column.append_paragraphs(remainder)
File "/home/vscode/.local/lib/python3.10/site-packages/ezdxf/tools/text_layout.py", line 1135, in append_paragraphs
paragraph.set_total_width(self.content_width)
File "/home/vscode/.local/lib/python3.10/site-packages/ezdxf/tools/text_layout.py", line 873, in set_total_width
raise ValueError("invalid width, no usable space left")
ValueError: invalid width, no usable space left
Describe the bug
Trying to draw a DXF file fails with a
ValueError("invalid width, no usable space left")
:To Reproduce
Version info:
Please find attached simplified
mtext_empty.dxf.zip
DXF that triggers the error:mtext_empty.dxf.zip
Expected behavior
![image](https://user-images.githubusercontent.com/4503494/217746994-44ca590e-4569-4ad3-943f-9833c5955cb5.png)
Drawing would appear with empty mtext like with QCAD:
The text was updated successfully, but these errors were encountered: