numpy
and fontTools
packages are hard dependencies.WARNING: The font support has changed drastically in this version.
If you directly use the ezdxf.tools.fonts
module, your code will break.
We apologize for the inconvenience. To use the previous version, pin the ezdxf
version
to v1.0.3 in your requirements.txt
file!
Font rendering using matplotlib
has been replaced by fontTools
. It is now faster and
more accurate. However, the convenient multi-platform support provided by matplotlib
must now be handled by ezdxf
, and it may not work as smoothly as with matplotlib
.
The available fonts on a system are cached in the $XDG_CACHE_HOME/ezdxf
directory,
which defaults to ~/.cache/ezdxf
. Please note that this cache will not be updated
automatically if you add or remove fonts.
To update the font cache, use the following command:
ezdxf --fonts
For more information on this topic, please refer to this link.
We've added new support for measuring and rendering .shx
, .shp
, and .lff
fonts.
Shape fonts are the basic stroke fonts commonly found in CAD applications. None of these
fonts are included in ezdxf
due to licensing restrictions or the restrictive licensing
of the .lff
fonts used in LibreCAD.
As there is no universal way to find these fonts, you will need to create a config file
and add the font directories where these fonts are located to the support_dirs
entry.
For more information on config files, please read this link.
On Linux, you can add symbolic links to these directories in the ~/.fonts
directory.
Don't forget to update the font cache when adding new font directories!
We've introduced new backends to the drawing
add-on, allowing you to export DXF content
as SVG, PDF, PNG, PLT/HPGL2, and simplified DXF files.
The new SVG backend is a native implementation and does not require the matplotlib
package. It creates smaller files and supports the new page layout features introduced
in this version.
The new PDF and PNG backends require the PyMuPdf
package, offering faster rendering
and support for the new page layout features compared to the matplotlib
package.
The PLT/HPGL2 backend creates plot files for raster plotters. It's a native implementation and does not require additional packages. CAUTION: The output of this backend is only tested with a plot file viewer and not on real hardware!
The DXF backend creates a flattened DXF file with only these DXF primitives: POINT, LINE, LWPOLYLINE, SPLINE, HATCH.
We've added a new tutorial for using these new backends and the new page layout features.
The hpgl2
add-on provides tools to process and convert HPGL/2 plot files. You can use
the hpgl
command in the launcher to view and convert plot files via a PyQt GUI:
ezdxf hpgl
For more information, please refer to the docs.
We've introduced a new ezdxf.xref
module to improve the handling of external references
and the import of resources. This module serves as a replacement for the Importer
add-on but has a completely different API.
For more information, please read the docs and the new tutorial.
If you have any comments, ideas, or suggestions, please feel free to post them in the discussion forum on GitHub.
See you sometime, take care, stay healthy!
Matplotlib
requires oriented outer paths and holes to draw correct filled paths MTEXT
entity in ATTRIB
and ATTDEF
entitiesPyMuPDF
deprecated method names, requires PyMuPDF
1.20.0 or newer drawing
add-on for these backends:
SVGBackend
, PyMuPdfBackend
and the PlotterBackend
drawing
add-on for these backends:
SVGBackend
, PyMuPdfBackend
and the PlotterBackend
\M+cxxxx
by the recover
modulenumpy
v1.25 has stopped providing Python 3.8 binary wheels on PyPI\M+cxxxx
in table namesezdxf.tools.fonts
module your code will break, sorry! Pin the ezdxf
version to
v1.0.3 in your requirements.txt
file to use the previous version!numpy
is a hard dependency, requires Python version >= 3.8fontTools
is a hard dependencyezdxf.xref
new core module to manage XREFs and load resources from DXF filesezdxf.addons.hpgl2
add-on to convert HPGL/2 plot files to DXF, SVG, PDF, PNGezdxf hpgl
command to view and/or convert HPGL/2 plot files to various formats: DXF, SVG, PDF, PNGSVG
, HPGL/2
and DXF
backends for the drawing
add-on, these backends
do not need additional libraries to workPyMuPdf
backend for the drawing
add-on, support for PDF, PNG, PPM and PBM exportColorPolicy
and BackgroundPolicy
configuration settings for the drawing
add-on to change/override foreground- and background color by the frontend TextPolicy
configuration settings for the drawing
add-on, render text as
solid filling, outline path, replace text by (filled) rectangles or ignore text at all BlockLayout.base_point
propertyezdxf.entities.acad_table_to_block()
function, converts a ACAD_TABLE
entity
to an INSERT
entityACADProxyEntity.explode()
method, to explode ACAD_PROXY_ENTITY
into proxy
graphic entitiesezdxf.fonts
including a big refactoringFontFace
class - weight
attribute is an int value (0-1000), stretch
is
renamed to width
and is now also an int value (1-9)matplotlib
font support module by fontTools
use_matplotlib
- is not needed anymorefont_cache_directory
- is not needed anymoredrawing
add-on and text measurement is done by the
fontTools
packageFrontend
classFrontend
classBackendInterface
and all derived backends support only 2D shapesezdxf.path.converter
Pillow
backend and the pillow
commandgeomdl
test dependencyMTEXT/MLEADER
inline commands "absolute text height" at transformationdimclrd
color for dimension arrow blocks