Release of ezdxf v1.1.0 #927
mozman
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
New Requirements
numpy
andfontTools
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 theezdxf
version to v1.0.3 in yourrequirements.txt
file!Font Rendering by FontTools
Font rendering using
matplotlib
has been replaced byfontTools
. It is now faster and more accurate. However, the convenient multi-platform support provided bymatplotlib
must now be handled byezdxf
, and it may not work as smoothly as withmatplotlib
.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:
For more information on this topic, please refer to this link.
Shape Font Support
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!
New Backends for the Drawing Add-on
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 thematplotlib
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.
New Hpgl2 Add-on
The
hpgl2
add-on provides tools to process and convert HPGL/2 plot files. You can use thehpgl
command in the launcher to view and convert plot files via a PyQt GUI:For more information, please refer to the docs.
New ezdxf.xref Module
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 theImporter
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!
Version 1.1.0 - 2023-09-09
ezdxf.tools.fonts
module your code will break, sorry! Pin theezdxf
version tov1.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
andDXF
backends for thedrawing
add-on, these backendsdo not need additional libraries to work
PyMuPdf
backend for thedrawing
add-on, support for PDF, PNG, PPM and PBM exportColorPolicy
andBackgroundPolicy
configuration settings for thedrawing
add-on to change/override foreground- and background color by the frontend
TextPolicy
configuration settings for thedrawing
add-on, render text assolid filling, outline path, replace text by (filled) rectangles or ignore text at all
stroke fonts included in CAD applications
BlockLayout.base_point
propertyezdxf.entities.acad_table_to_block()
function, converts aACAD_TABLE
entityto an
INSERT
entityACADProxyEntity.explode()
method, to explodeACAD_PROXY_ENTITY
into proxygraphic entities
ezdxf.fonts
including a big refactoring
FontFace
class -weight
attribute is an int value (0-1000),stretch
isrenamed to
width
and is now also an int value (1-9)matplotlib
font support module byfontTools
use_matplotlib
- is not needed anymorefont_cache_directory
- is not needed anymoredrawing
add-on and text measurement is done by thefontTools
packageFrontend
classFrontend
classBackendInterface
and all derived backends support only 2D shapesezdxf.path.converter
Pillow
backend and thepillow
commandgeomdl
test dependencyscale
MTEXT/MLEADER
inline commands "absolute text height" at transformationuse
dimclrd
color for dimension arrow blockslinetype and fill flag parsing for proxy graphics
fix ATTRIB and ATTDEF handling of version- and lock_position tags which share the
same group code 280 in the same subclass
Beta Was this translation helpful? Give feedback.
All reactions